--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/452f4e85-7ddb-9a55-f888-0a93d37f502c%40gmail.com.
Inspired by:
"https://twitter.com/rakyll/status/1348723364894961666"
"Yet another couple of hours spent on go.mod and go.sum. If I was giving #golang
a first try today, I'd just give up and look for another option. What are we
doing as a community to address this?"
Couldn't go have a folder based Go create command akin to Flutter create. That
creates a project in the current folder perhaps with a unique 128 bit ID or just
local folder based. IOW Hybrid between Go Path and Go mod (cd based, no GOPATH
env). Maybe there could be a Go import for adding another folder as a lib to the
.mod file?
I still get network calls that I don't want, too.
Sometimes I am in one
folder down and get odd failure messages WRT domains, before realising too.
I guess the point is that a domain is good for one scenario and env variables
shouldn't need editing for GoPATH. If env editing isn't needed for go path then
they should be put on an equal footing, maybe GoPATH put back in primary
position. I've never really used GoPATH much but I'm not sure a vendor folder
should be required.
If you work locally then you have to manually edit the .mod files. For me with a
replace directive to bring in general libraries. That is the likely scenario of
a new user.
I have noticed that GoPATH is more prominent again in the docs.
Generelly Gos docs and methods are far simpler and better than Dart/Flutters but
in this regard. Flutter create followed by opening the folder in an IDE with
import files as required, is a lot simpler. I believe they may have some complex
cyclic dependency checking though.
> FTR, I don't think what you are trying to solve here is a problem Jaana is having.
True, but I think maybe more pertinent to the issue of onboarding. After all if
you are using Kubernetes, then you aren't exactly opting for simplicity anyway.
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/930e33cd-be9d-c2d7-bc8c-ffa84e66e234%40gmail.com.
I guess it's the
Call code in an external package
"https://golang.org/doc/tutorial/getting-started"
That is a little hairy.
> How do you propose this tool will work?
Not sure exactly. I guess it would ask for remote Git or local Folder/Git option
and maybe folders to import. Then create a .mod and file with main() and those
imports. Maybe I should just be using filesystem links instead of replace
though. I might have tried that and ran into issues though. I should probably
just set up a local git server and /etc/hosts
It just seems that manually editing a .mod with replace entries as well as
imports in the project files to a non existent url location is a bolt on and not
a thoughtful solution.
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/a3c5862e-460a-796f-40cc-4d605c8c4e36%40gmail.com.
Maybe I need to look into -mod vendor as I didn't know that existed. Otherwise
disconnect your internet and then import a folder of local .go files that you
use in multiple projects?
There are several existing implementations of GOPROXY servers that may be used this way. A minimal implementation would serve files from a module cache directory and would use go mod download (with suitable configuration) to retrieve missing modules.
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/448d0354-65b5-4d0c-1566-88603fd9052e%40gmail.com.
On 1/12/21 12:37 PM, Axel Wagner wrote:
> Again, would be interesting how other languages can make this simpler, because I
> genuinely can't imagine.
The issue is that I believe go avoids files in order to speed up compilation.
It's just I don't believe the replace directive was meant for this and yet upon googling.
It is the only way that I have found. mod
vendor doesn't seem to do what I want.
They are fairly similar otherwise.
Flutter create
open lib/main.dart
add import to file locations in any dart files where you wish to access that
particular code (like in most languages)
add package to pubspec.yaml
IDE asks to run flutter pub get
add import referencing package where needed
vs
go mod init
edit .mod with weird replace line that links a domain to a file location
add import matching replace directive domain/url
go get package
add import for the package
As I said. I should probably just set up a local git server and sync up that
way. symlinks were only an issue in some programs and only when using Windows too.
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/8417466a-deb0-98f6-3635-3240278dbcc7%40gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAEkBMfF6axmeHxYMecoHfR%2BhBVdto_froMGVswRYaoKYWodHnQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAKYY9A%2BKrPwHSK00VjQcsyZoKxumaHWoR-pUi1Jww7hfRtijBA%40mail.gmail.com.