Closed sadmansakib closed 3 years ago
The proper fix is to add releases to the project that folks can download.
Looks like Go 1.16 turned on modules by default which is probably why it's not working. As a workaround you can build from source or try:
GO111MODULE=off go get -u github.com/jschaf/pggen
I tried it and it's broken because looks like Docker has vendored dependencies.
/go/src/github.com/jschaf/pggen/internal/pgdocker/pgdocker.go:213:3: cannot use "github.com/docker/go-connections/nat".PortSet literal (type "github.com/docker/go-connections/nat".PortSet) as type "github.com/docker/docker/vendor/github.com/docker/go-connections/nat".PortSet in field value
/go/src/github.com/jschaf/pggen/internal/pgdocker/pgdocker.go:217:3: cannot use "github.com/docker/go-connections/nat".PortMap literal (type "github.com/docker/go-connections/nat".PortMap) as type "github.com/docker/docker/vendor/github.com/docker/go-connections/nat".PortMap in field value
I found a workaround. I was able to install pggen binary on GOPATH by simply using
go get github.com/jschaf/pggen/cmd/pggen
I've updated the README with instructions for precompiled binaries. The binaries are generated with each commit to the main branch: https://github.com/jschaf/pggen#install
First of all thank your for this super interesting project. I am using pgx on a project of mine and i found pggen to be a good match for generating go codes. Now I suppose using the command given on documentation is supposed to install pggen binary on GOPATH or am i missing something? On my end the command does not install pggen binary on GOPATH thus make in totally inaccessible. My GO version is 1.16