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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use debug.ReadBuildInfo() for retrieving a version #3022

Open
Semior001 opened this issue Nov 21, 2022 · 0 comments 路 May be fixed by #3023
Open

Use debug.ReadBuildInfo() for retrieving a version #3022

Semior001 opened this issue Nov 21, 2022 · 0 comments 路 May be fixed by #3023

Comments

@Semior001
Copy link

馃殌 Feature

It's a common case when a developers just installs the utility from sources, without retrieving the binary that includes build info, which raises an issue of tracking the utility's version. Tool dependency has no help in here as mostly developers are installing it via running the command above:

$ go install \
    github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway \
    github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2 \
    google.golang.org/protobuf/cmd/protoc-gen-go \
    google.golang.org/grpc/cmd/protoc-gen-go-grpc

which just takes the latest versions of all tools without embedding any information about the utility's build.

I think it's a good idea to retrieve utility's version via debug.ReadBuildInfo, which was added in Go 1.18.

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

Successfully merging a pull request may close this issue.

1 participant