Cannot use my package

I am at the chapter 11 now and I do exactly what the bok says, but I still get this problem.
How do I fix that?
When I try to import my package, I get the error “can not import package…”

Show your go.mod file

go.mod for math package:

module math

go 1.17

go.mod for main

module main

go 1.17

I have managed to fix that! I have deleted go.mod for math and changed go.mod for main to

module golang-book/packs

go 1.17

I was trying to point you to this place.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.