Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/website/content/static/doc/tutorial: needs to suggest 'go mod init' before 'go run .' #44003

Closed
hyangah opened this issue Jan 30, 2021 · 3 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. release-blocker
Milestone

Comments

@hyangah
Copy link
Contributor

hyangah commented Jan 30, 2021

https://tip.golang.org/doc/tutorial/getting-started#code

The first section needs update to include go mod init command.
Otherwise, users will face a compile error for their first program.

$ go run .
go: cannot find main module; see 'go help modules'

cc @stevetraut

@seankhliao
Copy link
Member

https://tip.golang.org/doc/tutorial/getting-started#call

The second section also needs an explicit call to go get

» go run .
main.go:6:2: no required module provides package rsc.io/quote; to add it:
	go get rsc.io/quote

@seankhliao seankhliao added the NeedsFix The path to resolution is known, but the work has not been done. label Jan 31, 2021
@gopherbot
Copy link
Contributor

Change https://golang.org/cl/288277 mentions this issue: content: improve getting started document

@odeke-em odeke-em added this to the Go1.16 milestone Feb 1, 2021
@dmitshur dmitshur changed the title doc/tutorial: needs update before go1.16 x/website/content/static/doc/tutorial: needs to suggest 'go mod init' before 'go run .' Feb 4, 2021
@dmitshur
Copy link
Contributor

dmitshur commented Feb 4, 2021

This is the same as #43672, so I'll close this issue and update that one.

@dmitshur dmitshur closed this as completed Feb 4, 2021
@golang golang locked and limited conversation to collaborators Feb 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. release-blocker
Projects
None yet
Development

No branches or pull requests

5 participants