码迷,mamicode.com
首页 > 其他好文 > 详细

Updating Protobuf and GRPC in Golang

时间:2016-08-22 19:48:31      阅读:230      评论:0      收藏:0      [点我收藏+]

标签:

转自: http://russmatney.com/techsposure/update-protobuf-golang-grpc/


TL;DR: When protobuf updates, all the .protos and deps need to update.

This post is a quick-lookup for how to do that 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 go generate ./... in each go project’s root directory.

Published: July 09 2016

Updating Protobuf and GRPC in Golang

标签:

原文地址:http://www.cnblogs.com/xiaouisme/p/5796660.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!