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

Add go.mod for go module support #44

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add go.mod for go module support #44

wants to merge 1 commit into from

Conversation

b1ackmartian
Copy link

No description provided.

@alandonovan
Copy link
Collaborator

Thanks, but is this necessary? All the commands in the book such as go get gopl.io/... should work just fine without a go.mod file, and since the book predates and therefore doesn't explain go.mod files, I think it might be confusing to include it.

@pavelanni
Copy link

I think it would be helpful to have an Addendum to the book (at least on Github) which explains how to deal with new additions like modules, language server in VS Code, etc. For example, I started with instructions on the site (https://golang.org/doc/tutorial/getting-started and https://golang.org/doc/code.html) and then continued with the book. I was a bit confused and it took me a while to set my environment properly.
BTW, I found this PR by googling "gopl.io modules" :-)

@hyangah
Copy link

hyangah commented Jul 12, 2021

@alandonovan
Is it possible to add go.mod for this material?
Now Module mode is the default and go tools got picky about the lack of go.mod. gopls also gets confused how to scope the module boundary without it. (see golang/vscode-go#1613)

Many new Go users depend on this book. I believe adding go.mod will reduce the unnecessary distraction and improve the first impression on the language and the tools.

cc @stamblerre @ianthehat

@vdm
Copy link

vdm commented Feb 6, 2022

1ae3ec6 added go.mod

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants