Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't generate example, missing gogo.proto #140

Open
arvenil opened this issue Sep 1, 2020 · 2 comments
Open

Can't generate example, missing gogo.proto #140

arvenil opened this issue Sep 1, 2020 · 2 comments

Comments

@arvenil
Copy link

arvenil commented Sep 1, 2020

Sorry to bother you, I have another issue. I just tried the example and it fails on gogo.proto. I've tried to install it but it seems to be not effective.

❯ go get -u github.com/gogo/protobuf/proto
go: found github.com/gogo/protobuf/proto in github.com/gogo/protobuf v1.3.1
❯ ~/go/bin/gen --sqltype=postgres \
        --connstr "user=postgres dbname=postgres sslmode=disable password=pass port=5432 host=127.0.0.1" \
        --database main  \
        --json \
        --gorm \
        --guregu \
        --rest \
        --out ./example \
        --module example.com/rest/example \
        --mod \
        --server \
        --makefile \
        --json-fmt=snake \
        --generate-dao \
        --generate-proj \
        --overwrite
Generating code for the following tables (3)
[0] goose_db_version
[1] orders
[2] products
github.com/gogo/protobuf/gogoproto/gogo.proto does not exist on path - install with
go get -u github.com/gogo/protobuf/proto
@danysz
Copy link
Contributor

danysz commented Apr 18, 2021

I think I found the issue but I am not sure that I understand why we need this :

	srcPath := filepath.Join(gopath, "src")
	gogoPath := filepath.Join(gopath, "src/github.com/gogo/protobuf/gogoproto/gogo.proto")
	gogoImportExists := dbmeta.Exists(gogoPath)

Personal I don't have the src directory and of course all the rest. For me is installed in the pkg

@cdz620
Copy link

cdz620 commented Jan 5, 2022

fix it. Just run :GO111MODULE=off go get github.com/gogo/protobuf/proto

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants