> I also tried to build the whole project with `go build .`
To do that you would need:
mkdir -p bin
go build -o bin ./...
The following compiles fine for me. Note that in your original post the
error talks about api.PetStore, but the code you showed was a call to
api.NewPetStore.
The code you posted does not actually contain the string `api.PetStore`, so
it seems to be incomplete. From extrapolation, I agree that it should work,
so the issue must be in that incomplete part.
On Mon, Sep 11, 2023 at 11:23 PM Tong Sun wrote:
> This is really a go module 101 question, as
This is really a go module 101 question, as I'm trying to understand and
solve the *undefined types* problem that I'm having.
I have:
$ head -1 go.mod
module backend
And in my internal/petstore/main.go file, I have:
package main
import api "backend/internal/petstore/interfaces/ports"
func