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: outdated module introduction #55036

Open
fgergo opened this issue Sep 13, 2022 · 3 comments
Open

x/website: outdated module introduction #55036

fgergo opened this issue Sep 13, 2022 · 3 comments
Labels
Documentation modules NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. website

Comments

@fgergo
Copy link

fgergo commented Sep 13, 2022

https://go.dev/blog/using-go-modules is outdated.

In the blog entry it's supposed to work like this:
$ go test
PASS
ok _/home/gopher/hello 0.020s

but with 1.18 and 1.19 it works like this:
$ go test
go: go.mod file not found in current directory or any parent directory; see 'go help modules'

I believe an introductory blog should be working as described.

@gopherbot gopherbot added this to the Unreleased milestone Sep 13, 2022
@fgergo
Copy link
Author

fgergo commented Sep 13, 2022

+1 issue:
The 3rd 'go test' should be working like this:
$ go test
go: finding rsc.io/quote v1.5.2
go: downloading rsc.io/quote v1.5.2
go: extracting rsc.io/quote v1.5.2
go: finding rsc.io/sampler v1.3.0
go: finding golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c
go: downloading rsc.io/sampler v1.3.0
go: extracting rsc.io/sampler v1.3.0
go: downloading golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c
go: extracting golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c
PASS
ok example.com/hello 0.023s

but instead it doesn't:
$ go test
hello.go:2:8: no required module provides package rsc.io/quote; to add it:
go get rsc.io/quote
$

@D1CED
Copy link

D1CED commented Sep 13, 2022

Two objections here:

  1. It is explicitly stated in the first sentence that this content piece is directed at Go versions 1.11 and 1.12 and
  2. this is a blog post and not part of the official documentation. So IMO it holds some historic value and should not be updated, although stating that this is outdated and linking to a more recent post or the official documentation would be sensible.

Here are some pieces of up-to-date documentation Tutorial: Create a Go module and How to Write Go Code.

@fgergo
Copy link
Author

fgergo commented Sep 13, 2022

google search results for 'go modules' , 'go module', 'go module intro', 'go module introduction' all point to this blog post.
A note at the beginning and a link to the intended page should be fine.

@toothrot toothrot added the NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. label Sep 13, 2022
@dle8 dle8 modified the milestones: Unreleased, website/unplanned Sep 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation modules NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. website
Projects
None yet
Development

No branches or pull requests

6 participants