programming-kubernetes/cnat

go.mod: unexpected module path "k8s.io/sample-controller"

govargo opened this issue · 2 comments

What happened:

The Error about go module happened when I built cnat-controller by go build -o cnat-controller ..

What you expected to happen:

I can build cnat-controller successfully.

How to reproduce it (as minimally and precisely as possible):

$ go build -o cnat-controller .
go: finding github.com/programming-kubernetes/cnat/cnat-client-go/pkg/generated/listers/cnat/v1alpha1 latest
...
go: github.com/programming-kubernetes/cnat/cnat-client-go@v0.0.0-20190529124342-33d5f465910a: parsing go.mod: unexpected module path "k8s.io/sample-controller"
go: error loading module requirements

Anything else we need to know?:

I can build successfully cnat-controller when I replaced go.mod module path from k8s.io/sample-controller to github.com/programming-kubernetes/cnat/cnat-client-go.

-module k8s.io/sample-controller
+module github.com/programming-kubernetes/cnat/cnat-client-go

Environment:

Mac OS X 10.14.5
go version go1.12.9 darwin/amd64

Thank you.

Hit the same problem. Had to rename the module package to the github.com/programming-kubernetes/cnat/cnat-client-go.

Hope the author can update the instruction soon.

Thanks for flagging this @govargo and for confirming it @gangchen03! This was indeed an oversight of mine, fixing it now.