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

Missing go.mod in "Writing a unit test in Go" video. #22

Open
kenshih opened this issue Jun 21, 2021 · 0 comments
Open

Missing go.mod in "Writing a unit test in Go" video. #22

kenshih opened this issue Jun 21, 2021 · 0 comments

Comments

@kenshih
Copy link

kenshih commented Jun 21, 2021

Hello, Just a heads up...
https://egghead.io/lessons/egghead-writing-a-unit-test-in-go

When running your tutorial: "Writing a unit test in Go" on go version go1.16.5 darwin/amd64, I get the following error:

go: go.mod file not found in current directory or any parent directory; see 'go help modules'

Consider adding a go.mod file here & updating that video?

# file go.mod
module example.com/mod

(Also not, this video tests the code from "Writing a Function that Multiplies a Number by Two in Go", not the video that directly precedes it: "Returning Multiple Values from a Function in Go". So you have to revert your function first before running the test.)

Thanks for the videos. I enjoyed them.

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

No branches or pull requests

1 participant