{"id":252721,"date":"2015-03-10T13:40:04","date_gmt":"2015-03-10T09:40:04","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=252721"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=252721","title":{"rendered":"Go \u0438 Protocol Buffers \u0442\u043e\u043b\u0438\u043a\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0438 (\u0438\u043b\u0438 \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u0441\u0442\u0430\u0440\u0442, \u0434\u043b\u044f \u0442\u0435\u0445 \u043a\u0442\u043e \u0435\u0449\u0451 \u043d\u0435 \u0437\u043d\u0430\u043a\u043e\u043c)"},"content":{"rendered":"<p>     \t\u0412\u0435\u0441\u044c\u043c\u0430 \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u043a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Protocol Buffers \u0432 Go. \u0420\u0435\u0447\u044c \u043f\u043e\u0439\u0434\u0451\u0442 \u043e proto3, \u0442.\u0435. 3-\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430 (\u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u043c \u043c\u043e\u043c\u0435\u043d\u0442 \u0430\u043b\u044c\u0444\u0430), \u043e\u0431\u043e\u0431\u0449\u0451\u043d\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u0440 \u0441\u043f\u0440\u0430\u0432\u0435\u0434\u043b\u0438\u0432 \u0438 \u0434\u043b\u044f \u0432\u0442\u043e\u0440\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438. \u041d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u0430\u043c\u043e\u0433\u043e Protocol Buffers. \u0412\u043f\u0440\u043e\u0447\u0435\u043c \u0447\u0435\u0433\u043e \u0442\u044f\u043d\u0443\u0442\u044c<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h3>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430<\/h3>\n<p>  \u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043f\u043e \u0442\u0440\u0435\u0442\u044c\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043d\u0435\u0442, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438\u0434\u0451\u043c <a href=\"https:\/\/github.com\/google\/protobuf\/releases\">\u0441\u044e\u0434\u0430<\/a> \u0447\u0438\u0442\u0430\u0435\u043c \u0438 \u043a\u0430\u0447\u0430\u0435\u043c. \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c (\u0442\u0430\u043c \u0432\u0441\u0451 \u043f\u0440\u043e\u0441\u0442\u043e). \u0422\u0435\u043f\u0435\u0440\u044c \u0447\u0442\u043e \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f Go \u2014 \u0432\u0441\u0451 <a href=\"https:\/\/github.com\/golang\/protobuf\">\u0437\u0434\u0435\u0441\u044c<\/a>. \u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430<\/p>\n<pre><code class=\"bash\">go get -u github.com\/golang\/protobuf\/{proto,protoc-gen-go} <\/code><\/pre>\n<p>\u041c\u043e\u0436\u0435\u0442 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f <code>-f<\/code> \u0435\u0441\u043b\u0438 \u0432 <code>~\/.gitconfig<\/code> \u0443 \u0412\u0430\u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u043e<\/p>\n<pre><code>[url &quot;ssh:\/\/git@github.com\/&quot;]         insteadOf = https:\/\/github.com\/ <\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0412\u044b \u0435\u0449\u0451 \u043d\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u044b \u0441 Protocl Buffers, \u0442\u043e <a href=\"https:\/\/developers.google.com\/protocol-buffers\/docs\/proto\">\u0437\u0434\u0435\u0441\u044c<\/a> (<i>\u0430\u043d\u0433\u043b.<\/i>) \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 2-\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438. \u0414\u043b\u044f \u0442\u0440\u0435\u0442\u044c\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043f\u043e\u043a\u0430 \u043d\u0435\u0442 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438, \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u0434\u043e\u0432\u043e\u043b\u044c\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043b\u0438\u0448\u044c <a href=\"https:\/\/github.com\/google\/protobuf\/releases\">\u044d\u0442\u0438\u043c<\/a>.<\/p>\n<h3>\u041f\u0440\u0438\u043c\u0435\u0440<\/h3>\n<p>  \u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0431\u0443\u0434\u0435\u043c \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u043c\u0430\u0441\u0441\u0438\u0432 \u0438\u0437 \u0447\u0438\u0441\u0435\u043b \u0438 \u0441\u0442\u0440\u043e\u043a\u0443, \u0430 \u043f\u043e\u0442\u043e\u043c \u0447\u0438\u0442\u0430\u0442\u044c \u0438\u0445 \u043e\u0431\u0440\u0430\u0442\u043d\u043e. \u0414\u0430\u043b\u0435\u0435 \u0431\u0443\u0434\u0435\u043c \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0447\u0442\u043e \u043c\u044b \u043d\u0430\u0445\u043e\u0434\u0438\u043c\u0441\u044f \u0432 \u043a\u043e\u0440\u043d\u0435 \u043d\u0430\u0448\u0435\u0433\u043e \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u041f\u0440\u043e\u0442\u043e-\u0444\u0430\u0439\u043b \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">msg\/msg.proto<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code>\/\/ \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u043a\u0430\u043a \u0432 C\/C++ \/*      \u0438 \u043c\u043d\u043e\u0433\u043e\u0441\u0442\u0440\u043e\u0447\u043d\u044b\u0435 \u0442\u043e\u0436\u0435 *\/ \/\/ \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u0432\u0435\u0440\u0441\u0438\u0438 3, \u043e\u043d\u0430 \u043f\u043e\u043a\u0430 \u0447\u0442\u043e \u0430\u043b\u044c\u0444\u0430 - \u0431\u0443\u0434\u0435\u043c \u0434\u0443\u043c\u0430\u0442\u044c \u043e \u0431\u0443\u0434\u0443\u044e\u0449\u0435\u043c syntax = &quot;proto3&quot;;  \/\/ \u0438\u043c\u044f \u043f\u0430\u043a\u0435\u0442\u0430, \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0438\u0440\u0443\u044e\u0449\u0435\u043c go-\u0444\u0430\u0439\u043b\u0435 \u044d\u0442\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f package msg;  \/\/ \u0442\u0438\u043f \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c message Msg {         \/\/ \u0442\u0438\u043f \u0438\u043c\u044f_\u043f\u043e\u043b\u044f = \u043d\u043e\u043c\u0435\u0440_\u043f\u043e\u043b\u044f         string key = 1;         \/\/ repeated \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 slice         repeated int64 value = 2; } \/*  \u0432 \u0442\u0440\u0435\u0442\u044c\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043d\u0435\u0442 required \u043f\u043e\u043b\u0435\u0439 \u0438 extensions  \u0432\u043c\u0435\u0441\u0442\u043e extensions \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d (\u043f\u043e\u043a\u0430 \u0435\u0449\u0451 \u043d\u0435) \u0442\u0438\u043f Any \u043e \u043d\u0451\u043c \u043f\u043e\u043f\u043e\u0437\u0436\u0435 *\/ \/\/ \u043a\u0441\u0442\u0430\u0442\u0438 \u0434\u043b\u044f Sublime \u0435\u0441\u0442\u044c \u043f\u043e\u0434\u0441\u0432\u0435\u0442\u043a\u0430 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0430 <\/code><\/pre>\n<\/div>\n<\/div>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0442\u043e-\u0444\u0430\u0439\u043b<\/p>\n<pre><code class=\"bash\"> protoc --go_out=. msg\/*.proto <\/code><\/pre>\n<p>  \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0442\u0430\u043a\u043e\u0439 \u0432\u043e \u0444\u0430\u0439\u043b\u0438\u043a<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">msg\/msg.pb.go<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"go\">\/\/ \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u0432\u044b\u043f\u0438\u043b\u0435\u043d\u044b package msg  import proto &quot;github.com\/golang\/protobuf\/proto&quot;  var _ = proto.Marshal  \/* \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043e\u0431\u0440\u0435\u043b\u0430 \u0442\u0430\u043a\u043e\u0439 \u0432\u0438\u0434. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u044b \u0442\u044d\u0433\u0438 \u0434\u043b\u044f JSON *\/ type Msg struct {         Key   string  `protobuf:&quot;bytes,1,opt,name=key&quot; json:&quot;key,omitempty&quot;`         Value []int64 `protobuf:&quot;varint,2,rep,name=value&quot; json:&quot;value,omitempty&quot;` }  \/\/ \u043c\u0435\u0442\u043e\u0434\u044b \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b, \u0447\u0442\u043e\u0431\u044b \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u0430 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0443 proto.Message func (m *Msg) Reset()         { *m = Msg{} } func (m *Msg) String() string { return proto.CompactTextString(m) } func (*Msg) ProtoMessage()    {}  func init() { } <\/code><\/pre>\n<\/div>\n<\/div>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443, \u0437\u0430\u043f\u0438\u0448\u0435\u043c \u0435\u0451 \u0431\u0430\u0439\u0442\u044b, \u0438 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0435\u043c \u043e\u0431\u0440\u0430\u0442\u043d\u043e<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">main.go<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"go\">package main  import ( \t&quot;log&quot;  \t&quot;.\/msg&quot; \t&quot;github.com\/golang\/protobuf\/proto&quot; )  func main() { \t\/\/ \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u043e\u0432\u043e\u0435 &quot;\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435&quot; \tmsg1 := &msg.Msg{ \t\tKey:   &quot;Hello Protocol Buffers&quot;, \t\tValue: []int64{1, 2, 3, 4}, \t} \t\/\/ \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0432 \u0431\u0430\u0439\u0442\u044b \tdata, err := proto.Marshal(msg1) \tif err != nil { \t\tlog.Fatal(&quot;marshaling error: &quot;, err) \t\treturn \t} \t\/\/ \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0436\u0435 \u043e\u043d\u0430 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u043f\u0430\u043c\u044f\u0442\u0438? \tlog.Printf(&quot;data length: %d&quot;, len(data)) \t\/\/ \u0431\u0430\u0439\u0442\u044b \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \tmsg2 := new(msg.Msg) \terr = proto.Unmarshal(data, msg2) \tif err != nil { \t\tlog.Fatal(&quot;unmarshaling error: &quot;, err) \t} \t\/\/ \u0442\u0435\u043f\u0435\u0440\u044c \u043e\u0431\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u043a\u0440\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0440\u0430\u0432\u043d\u044b \tif msg1.Key != msg2.Key { \t\tlog.Printf(&quot;unexpected value, expected '%s', got '%s'&quot;, msg1.Key, msg2.Key) \t} \tfor i := 0; i &lt; 4; i++ { \t\tif msg1.Value[i] != msg2.Value[i] { \t\t\tlog.Printf(&quot;unexpected value, expected %d, got %d&quot;, msg1.Value[i], msg2.Value[i]) \t\t} \t} \tlog.Println(&quot;Done&quot;) } <\/code><\/pre>\n<\/div>\n<\/div>\n<p>  \u041a\u0430\u043a \u0432\u0438\u0434\u0438\u0442\u0435 \u00ab\u043f\u0440\u043e\u0449\u0435 \u043f\u0430\u0440\u0435\u043d\u043e\u0439 \u0440\u0435\u043f\u044b\u00bb. \u0415\u0441\u043b\u0438 \u043a\u043e\u043f\u043d\u0443\u0442\u044c \u0433\u043b\u0443\u0431\u0436\u0435, \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c \u0435\u0441\u0442\u044c \u0436\u0435\u043b\u0430\u043d\u0438\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u0435\u043a\u0443\u044e \u0431\u0430\u0437\u0443, \u0445\u0440\u0430\u043d\u044f\u0449\u0443\u044e \u00ab\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f\u00bb \u2014 \u0442\u0430\u043a, \u0447\u0442\u043e \u0442\u0438\u043f \u00ab\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f\u00bb \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u043d\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d, \u043f\u0440\u0438\u0447\u0451\u043c \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u044d\u0442\u0438 \u00ab\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f\u00bb \u0432 \u0447\u043b\u0435\u043d\u0441\u0442\u0432\u0435 \u043d\u0435\u043a\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b. \u0418\u043d\u044b\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438 \u0438\u043c\u0435\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u0442\u043e, \u0447\u0442\u043e \u043c\u044b \u0435\u0439 \u0434\u0430\u0434\u0438\u043c \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435. \u0412 proto3 \u2014 \u0442\u0440\u0435\u0442\u044c\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 protocol buffers \u2014 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u0442\u0438\u043f Any, \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043b\u044e\u0431\u044b\u0445 \u0442\u0438\u043f\u043e\u0432. \u0422\u0430\u043a \u0433\u043b\u0430\u0441\u0438\u0442 \u0437\u0430\u043c\u0435\u0442\u043a\u0430 \u043a \u0440\u0435\u043b\u0438\u0437\u0443, \u0430 \u043d\u0430 \u0434\u0435\u043b\u0435 \u043f\u043e\u043a\u0430 \u0447\u0442\u043e <a href=\"https:\/\/github.com\/google\/protobuf\/issues\/198\">\u0442\u0430\u043a<\/a>. \u041f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u043f\u043e\u0434\u043e\u0436\u0434\u0430\u0442\u044c. \u041e\u0434\u043d\u0430\u043a\u043e \u0435\u0441\u043b\u0438 \u0432\u0437\u0433\u043b\u044f\u043d\u0443\u0442\u044c \u043d\u0430 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435 \u0432\u044b\u0448\u0435, \u0442\u043e \u043f\u0440\u0438\u043d\u0446\u0438\u043f \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c\u0441\u044f \u044f\u0441\u0435\u043d \u2014 \u0434\u0435\u043b\u043e \u0437\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439. Any \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"cpp\">message Any {   string type_url = 1; \/\/ \u0442\u0438\u043f   bytes value = 2; \/\/ \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0442\u0438\u043f\u0430 \u0432 \u0431\u0430\u0439\u0442\u0430\u0445 } <\/code><\/pre>\n<p>  \u0427\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442\u2026 \u0412\u043f\u0440\u043e\u0447\u0435\u043c \u0434\u043e\u043b\u0433\u043e \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c, \u0432\u0437\u0433\u043b\u044f\u043d\u0438\u0442\u0435 \u043d\u0430 <a href=\"https:\/\/github.com\/logrusorgru\/gopb3any\">\u043f\u0440\u0438\u043c\u0435\u0440<\/a>. \u041f\u043e \u0441\u0443\u0442\u0438 \u044d\u0442\u043e \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044f \u0432\u0441\u0435\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 \u0438 \u0434\u0432\u043e\u0439\u043d\u043e\u0439 \u043c\u0430\u0440\u0448\u0430\u043b\u0438\u043d\u0433 \u2014 \u043c\u0430\u0440\u0448\u0430\u043b\u0438\u043d\u0433 \u043d\u0435\u043a\u043e\u0435\u0433\u043e \u0442\u0438\u043f\u0430, \u0430 \u0437\u0430\u0442\u0435\u043c \u043c\u0430\u0440\u0448\u0430\u043b\u0438\u043d\u0433 \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b. \u0412\u0441\u0451 \u044d\u0442\u043e \u0434\u0438\u043a\u043e \u043f\u043e\u043f\u0435\u0440\u0447\u0451\u043d\u043e \u0440\u0435\u0444\u043b\u0435\u043a\u0441\u0438\u0435\u0439. \u0414\u0430 \u2014 \u0440\u0435\u0444\u043b\u0435\u043a\u0441\u0438\u044f \u044d\u0442\u043e \u0434\u043e\u043b\u0433\u043e, \u0442\u0443\u0442 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043f\u043e\u0434\u0435\u043b\u0430\u0435\u0448\u044c. \u041d\u0430 \u044d\u0442\u043e\u043c \u0432\u0441\u0451.<\/p>\n<hr\/>\n<h6>\u0420\u0435\u0444\u0435\u0440\u0435\u043d\u0441<\/h6>\n<p>  <a href=\"https:\/\/github.com\/google\/protobuf\/releases\">\u0420\u0435\u043b\u0438\u0437\u044b Protocol Buffers \u043d\u0430 GitHub<\/a><br \/>  <a href=\"https:\/\/github.com\/google\/protobuf\/issues\">\u0422\u0430\u043c \u0436\u0435, \u0442\u0440\u0435\u043a\u0435\u0440<\/a><br \/>  <a href=\"https:\/\/github.com\/golang\/protobuf\">\u041e\u0434\u043d\u0430 \u0438\u0437 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439 Protocol Buffers \u0434\u043b\u044f Go<\/a><br \/>  <a href=\"https:\/\/developers.google.com\/protocol-buffers\/docs\/proto\">\u041f\u0443\u0442\u0435\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c \u043f\u043e Protocol Buffers v2<\/a><br \/>  <a href=\"https:\/\/developers.google.com\/protocol-buffers\/docs\/proto#scalar\">\u0422\u0430\u043c \u0436\u0435, \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u0442\u0438\u043f\u044b \u0434\u0430\u043d\u043d\u044b\u0445<\/a>    \t\t\t\t<\/p>\n<div class=\"polling\">\n<form action=\"\/json\/polling\/\" class=\"poll\" method=\"post\">\n<div class=\"poll_title\">\u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430<\/div>\n<p>  \t\t<input type=\"hidden\" name=\"post_id\" value=\"252455\"\/> \t\t<input type=\"hidden\" name=\"polling_question_id\" value=\"13277\"\/>  \t\t<\/p>\n<table class=\"answer\">\n<tr>\n<td class=\"input\"> \t\t\t\t\t<input type=\"radio\" id=\"vv65705\" \t\t\t\t\t\tclass=\"radio js-field-data\" \t\t\t\t\t\tname=\"variant[]\" \t\t\t\t\t\tvalue=\"65705\" \/> \t\t\t\t<\/td>\n<td class=\"label\"> \t\t\t\t\t<label for=\"vv65705\">\u043d\u0438\u0447\u0435\u0433\u043e \u043d\u043e\u0432\u043e\u0433\u043e<\/label> \t\t\t\t<\/td>\n<\/tr>\n<tr>\n<td class=\"input\"> \t\t\t\t\t<input type=\"radio\" id=\"vv65707\" \t\t\t\t\t\tclass=\"radio js-field-data\" \t\t\t\t\t\tname=\"variant[]\" \t\t\t\t\t\tvalue=\"65707\" \/> \t\t\t\t<\/td>\n<td class=\"label\"> \t\t\t\t\t<label for=\"vv65707\">\u043f\u043e\u0447\u0442\u0438 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u043e\u0432\u043e\u0433\u043e<\/label> \t\t\t\t<\/td>\n<\/tr>\n<tr>\n<td class=\"input\"> \t\t\t\t\t<input type=\"radio\" id=\"vv65709\" \t\t\t\t\t\tclass=\"radio js-field-data\" \t\t\t\t\t\tname=\"variant[]\" \t\t\t\t\t\tvalue=\"65709\" \/> \t\t\t\t<\/td>\n<td class=\"label\"> \t\t\t\t\t<label for=\"vv65709\">\u043d\u0435 \u0433\u043e\u043b\u043e\u0441\u0443\u044e<\/label> \t\t\t\t<\/td>\n<\/tr>\n<\/table>\n<p class=\"total\">\u041f\u0440\u043e\u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043b\u043e 7 \u0447\u0435\u043b\u043e\u0432\u0435\u043a. \u0412\u043e\u0437\u0434\u0435\u0440\u0436\u0430\u043b\u043e\u0441\u044c 13 \u0447\u0435\u043b\u043e\u0432\u0435\u043a.<\/p>\n<\/p><\/form>\n<p class=\"for_users_only_msg\">\u0422\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u043e\u043f\u0440\u043e\u0441\u0435. <a href=\"https:\/\/habrahabr.ru\/auth\/login\/\">\u0412\u043e\u0439\u0434\u0438\u0442\u0435<\/a>, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430.<\/p>\n<\/p><\/div>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/252455\/\"> http:\/\/habrahabr.ru\/post\/252455\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>     \t\u0412\u0435\u0441\u044c\u043c\u0430 \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u043a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Protocol Buffers \u0432 Go. \u0420\u0435\u0447\u044c \u043f\u043e\u0439\u0434\u0451\u0442 \u043e proto3, \u0442.\u0435. 3-\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430 (\u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u043c \u043c\u043e\u043c\u0435\u043d\u0442 \u0430\u043b\u044c\u0444\u0430), \u043e\u0431\u043e\u0431\u0449\u0451\u043d\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u0440 \u0441\u043f\u0440\u0430\u0432\u0435\u0434\u043b\u0438\u0432 \u0438 \u0434\u043b\u044f \u0432\u0442\u043e\u0440\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438. \u041d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u0430\u043c\u043e\u0433\u043e Protocol Buffers. \u0412\u043f\u0440\u043e\u0447\u0435\u043c \u0447\u0435\u0433\u043e \u0442\u044f\u043d\u0443\u0442\u044c  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-252721","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/252721","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=252721"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/252721\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=252721"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=252721"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=252721"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}