> 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. Incidentally, you might also want to 
read https://google.github.io/styleguide/go/best-practices#naming

==> ./go.mod <==
module backend

==> ./internal/petstore/main.go <==
package main

import api "backend/internal/petstore/interfaces/ports"

func main() {
_ = api.PetStore{}
}

==> ./internal/petstore/interfaces/ports/type.go <==
package api
type PetStore struct {}

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/3925d84f-6d7a-46c5-a6c9-eb9806bed253n%40googlegroups.com.

Reply via email to