On Wed, Jul 24, 2019 at 10:11 PM Marcin Romaszewicz <marc...@gmail.com> wrote: > > Hi All, > > I've got a module problem which I don't quite understand. All my code is here: > https://github.com/deepmap/oapi-codegen > > When I run "go build" from the top of the repo, I get: > $ go build > can't load package: package github.com/deepmap/oapi-codegen: unknown import > path "github.com/deepmap/oapi-codegen": cannot find module providing package > github.com/deepmap/oapi-codegen
You're trying to build oapi-codegen package, which has no go files to build. Try go build <path_to_main.go> > > However, this works: > $ go build ./... > > Why can't my module find itself? > > I am using Go 1.12.7 on OS X. GO111MODULE=auto, and I am not in my $GOPATH. > The > go.mod contains: > module github.com/deepmap/oapi-codegen > > require (... <lots of stuff> ...) > > The same issue happens with go generate, go test, etc, but that makes sense > as it all builds on top of the build command. > > Thanks for any tips, > -- Marcin > > -- > 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/CA%2Bv29LsHRrbULJDcT8kP8fnmP%3Dc8G0Oa1PXwLZ3a%2BPzN%2BWa8wg%40mail.gmail.com. -- 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/CAMV2Rqq6O5fQGqyG%2Bi%3DzrU6AYM3HR1dQR1x9QZaOb5pUMk1e_w%40mail.gmail.com.