x/website: improve /doc/tutorial/call-module-code to adapt to the Go 1.16 #44479
Labels
Documentation
FrozenDueToAge
NeedsFix
The path to resolution is known, but the work has not been done.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Step 5.2 doesn't work in go version 1.16. The workaround is to add the require directive.
working module hello
output:What did you expect to see?
$ go build
go: found example.com/greetings in example.com/greetings v0.0.0-00010101000000-0
What did you see instead?
$ go build
hello.go:5:5: module example.com/greetings provides package example.com/greetings and is replaced but not required; to add it:
go get example.com/greetings
The text was updated successfully, but these errors were encountered: