Re: [go-nuts] Go 1.16 and modules

2021-03-29 Thread Jon Reiter
i think it's gentler to look at this in the context of c's "hello world" program. the first version was missing both #include and void. then it got #include. then it got void. i recall void issues with code from k v1 on my compiler in the mid 80s (i do not predate include statements). i recall

Re: [go-nuts] Go 1.16 and modules

2021-03-29 Thread Eli Bendersky
On Mon, Mar 29, 2021 at 4:52 PM Rich wrote: > I really WANT to use go modules on all my projects, but there are times I > just want to write a quick piece of code that I can 'go run'. Its usually > just 20 lines, just used to test something out like a rest call to an > internal server (can't do

Re: [go-nuts] Go 1.16 and modules

2021-03-29 Thread 'Axel Wagner' via golang-nuts
I understand many criticisms of modules, but I honestly don't really get this one. You can just do `go mod init foo` in an empty directory, if all you want is some throwaway Go code. It doesn't actually seem very complicated to me, I must say. On Tue, Mar 30, 2021 at 1:52 AM Rich wrote: > I

Re: [go-nuts] Go 1.16 and modules

2021-03-29 Thread Rich
I really WANT to use go modules on all my projects, but there are times I just want to write a quick piece of code that I can 'go run'. Its usually just 20 lines, just used to test something out like a rest call to an internal server (can't do that on go playground) and for me go modules just

Re: [go-nuts] Go 1.16 and modules

2021-03-28 Thread Amit Saha
On Mon, Mar 29, 2021 at 12:15 PM Reto wrote: > > On Mon, Mar 29, 2021 at 11:18:28AM +1100, Amit Saha wrote: > > "Module-aware mode is enabled by default, regardless of whether a > > go.mod file is present in the current working directory or a parent > > directory. More precisely, the GO111MODULE

Re: [go-nuts] Go 1.16 and modules

2021-03-28 Thread Reto
On Mon, Mar 29, 2021 at 11:18:28AM +1100, Amit Saha wrote: > "Module-aware mode is enabled by default, regardless of whether a > go.mod file is present in the current working directory or a parent > directory. More precisely, the GO111MODULE environment variable now > defaults to on. To switch to

[go-nuts] Go 1.16 and modules

2021-03-28 Thread Amit Saha
Hi Folks, I just realized that with Go 1.16, you must create a module via go mod init, even if you are writing a simple hello world program. The most surprising aspect to me was that I can only know that's the case if I don't have a go.mod file anywhere in the parent directory chain. It becomes