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 quite a bit of a surprise element for folks writing
materials for others to follow.

Was this change documented in the release notes? We do  have this:

"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 the previous behavior, set GO111MODULE to
auto. "

Is that implying the above behavior?

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CANODV3m%2BLCDQem%2Bewny29SHXxvH-TtzW2zHuJ9-08TFX%3DSmYKw%40mail.gmail.com.

Reply via email to