golang / protobuf

Go support for Google's protocol buffers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Installation instructions for the common case (nit feature request)

janpfeifer opened this issue · comments

commented

Is your feature request related to a problem? Please describe.

My project was using the older generation of the protoc / protoc-gen-go, and for years I didn't need to update the API so I never needed to run protoc and never upgraded.

Today I went to use, and my old installation instructions for those didn't work anymore.

A little digging and I figured it out ... but maybe a little installation instruction would have saved me (and other developers) some time. After all, if every library/package we use require a little digging around, we developers never move forward 😄

I was looking at:

https://pkg.go.dev/google.golang.org/protobuf@v1.32.0
https://github.com/protocolbuffers/protobuf-go?tab=readme-ov-file

And I didn't find installation instructions.

It would be nice to have simple installation instructions for the "common" cases (linux/ubuntu, mac, windows) somewhere, that all these documentation pages could link to ?

Can be as simple as:

Installation

Linux/Ubuntu

$ sudo apt install protobuf-compiler
$ go install google.golang.org/protobuf/cmd/protoc-gen-go@latest

Like this? https://protobuf.dev/getting-started/gotutorial/#compiling-protocol-buffers

(This might need to be brought into as a reference somewhere more prominent, rather than something that only shows up in tutorials?)

commented

Thanks for the pointer @puellanivis !

Indeed that seems the link I was looking for ... Maybe indeed, just improving it's discoverability: a suggestion would be to add an emphasized (big) link to "Tutorial and installation" to the Github and pkg.go.dev documentation pages ? What do you think ?