Updating Protobuf and Grpc in Golang

Source: Internet
Author: User
This is a creation in Article, where the information may have evolved or changed.

Transferred from: http://russmatney.com/techsposure/update-protobuf-golang-grpc/

tl;dr: When Protobuf updates, all the .proto s and deps need to update.

This post is a quick-lookup-for-you-do, so I-m not googling it every time.

Go Dependencies

Update your relevant go dependencies:

sh go get -u github.com/golang/protobuf/{proto,protoc-gen-go} && \ go get -u google.golang.org/grpc

Update Protoc

Then (or before) download and install the latest Protoc binary:github.com/google/protobuf/releases.

Download the zip, open it, and move the protoc executable file into somewhere on your path.

sh mv ~/Downloads/protoc-3.0.0-beta-3.1-osx-x86_64/protoc /usr/local

Rebuild where necessary

Rebuild your .protoc files, likely per project.

For me, this means running in each go generate ./... go project ' s root directory.

Published: July

    • Category:
    • Techsposure 42
    • Tags:
    • Golang 2
    • Protobuf 1
    • GRPC 1
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.