{"id":273936,"date":"2016-02-09T21:33:03","date_gmt":"2016-02-09T18:33:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=273936"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=273936","title":{"rendered":"Go \u0438 Protocol Buffers, \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u0435"},"content":{"rendered":"<p>       \u041d\u0435\u043a\u043e\u0435 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habrahabr.ru\/post\/252455\/\">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)<\/a>. \u041f\u0440\u043e\u0446\u0435\u0441\u0441\u044b \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f\/\u0434\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0435 \u0444\u043e\u0440\u043c\u0430\u0442\u044b \u0432 Go \u0442\u0435\u0441\u043d\u043e \u0441\u0432\u044f\u0437\u044f\u043d\u044b \u0441 \u0440\u0435\u0444\u043b\u0435\u043a\u0441\u0438\u0435\u0439. \u0410 \u043a\u0430\u043a \u043c\u044b \u0441 \u0412\u0430\u043c\u0438, \u0434\u043e\u0440\u043e\u0433\u043e\u0439 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044c, \u0437\u043d\u0430\u0435\u043c \u2014 \u0440\u0435\u0444\u043b\u0435\u043a\u0441\u0438\u044f \u2014 \u044d\u0442\u043e \u0434\u043e\u043b\u0433\u043e. \u041e \u0442\u043e\u043c \u043a\u0430\u043a\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0431\u043e\u0440\u044c\u0431\u044b \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u044d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f. \u0414\u0443\u043c\u0430\u044e \u0447\u0442\u043e, \u0438\u0441\u043a\u0443\u0448\u0451\u043d\u043d\u044b\u0435 \u0432\u0440\u044f\u0434 \u043b\u0438 \u043d\u0430\u0439\u0434\u0443\u0442 \u0432 \u043d\u0435\u0439, \u0447\u0442\u043e-\u043b\u0438\u0431\u043e \u043d\u043e\u0432\u043e\u0435.<br \/>  <a name=\"habracut\"><\/a><\/p>\n<h4>\u041a\u043e\u0440\u0435\u043d\u044c<\/h4>\n<p>  \u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0432 \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u043e\u0441\u044c \u043e \u043f\u0430\u043a\u0435\u0442\u0430\u0445 <code>github.com\/golang\/protobuf\/{proto,protoc-gen-go}<\/code>. \u0427\u0442\u043e \u0441 \u043d\u0438\u043c\u0438 \u043d\u0435 \u0442\u0430\u043a? \u0418\u043c\u0435\u043d\u043d\u043e, \u0442\u043e, \u0447\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0440\u0435\u0444\u043b\u0435\u043a\u0441\u0438\u044f. \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c \u0443 \u0412\u0430\u0441 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043f\u0440\u043e\u0435\u043a\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b \u043d\u0430\u0431\u043e\u0440\u043e\u043c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440. \u0418 \u044d\u0442\u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0442\u043e \u0438 \u0434\u0435\u043b\u043e \u043a\u043e\u0434\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0432 Protocol Buffers \u0438 \u043e\u0431\u0440\u0430\u0442\u043d\u043e. \u0415\u0441\u043b\u0438 \u0431 \u044d\u0442\u043e \u0431\u044b\u043b\u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u0440\u0430\u0437\u043d\u044b\u0435, \u043d\u0435\u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0443\u0435\u043c\u044b\u0435 \u0442\u0438\u043f\u044b, \u0442\u043e \u043d\u0435\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c. \u041d\u043e \u0435\u0441\u043b\u0438 \u043d\u0430\u0431\u043e\u0440 \u0438\u0437\u0432\u0435\u0441\u0442\u0435\u043d \u0437\u0430\u0440\u0430\u043d\u0435\u0435, \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u043d\u0435\u0437\u0430\u0447\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u0444\u043b\u0435\u043a\u0441\u0438\u044e. \u041a\u0430\u043a \u0412\u0430\u043c \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e, \u043f\u0440\u0438\u043d\u044f\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u043a\u043e\u0442\u0440\u043e\u044b\u0439 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435. \u0412\u043e\u0442 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043a\u0443\u0441\u043e\u0447\u0435\u043a \u0438\u0437 <code>encoding\/json<\/code>:  <\/p>\n<pre><code class=\"go\">type Marshaler interface {     MarshalJSON() ([]byte, error) } type Unmarshaler interface {     UnmarshalJSON([]byte) error } <\/code><\/pre>\n<p>  \u0420\u0435\u0444\u0435\u0440\u0435\u043d\u0441: <a href=\"https:\/\/godoc.org\/encoding\/json#Marshaler\">Marshaler<\/a>, <a href=\"https:\/\/godoc.org\/encoding\/json#Unmarshaler\">Unmarshaler<\/a>.<br \/>  \u0415\u0441\u043b\u0438 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0449\u0438\u043a \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442 \u0442\u0438\u043f \u0432\u043e\u043f\u043b\u043e\u0449\u0430\u044e\u0449\u0438\u0439 \u043e\u0434\u0438\u043d \u0438\u0437 \u044d\u0442\u0438\u0445 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432, \u0442\u043e \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u0441\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u0432\u043e\u0437\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0438\u0445 \u043c\u0435\u0442\u043e\u0434\u044b.  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u0440\u043e\u0441\u0442\u043e\u0439 json-\u043f\u0440\u0438\u043c\u0435\u0440<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"go\">type X struct {     Name string,     Value int, }  func (x *X) MarshalJSON() ([]byte, error) {     return []byte(fmt.Sprintf(`{&quot;name&quot;: %q, &quot;value&quot;: %d}`, x.Name, x.Value)) } <\/code><\/pre>\n<p>  \u041d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 <code>(Un)Marshaler<\/code> \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u0442\u0430\u043a \u0440\u0430\u0434\u0443\u0436\u043d\u043e. \u0412\u043e\u0442 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u0443\u0442 \u0435\u0441\u0442\u044c \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u043f\u0440\u043e <a href=\"http:\/\/ghodss.com\/2014\/the-right-way-to-handle-yaml-in-golang\/\">yaml (<i>\u0430\u043d\u0433\u043b.<\/i>)<\/a> \u0438 \u0432\u043e\u043e\u0431\u0449\u0435 \u043f\u043e \u044d\u0442\u043e\u0439 \u0442\u0435\u043c\u0435.  <\/div>\n<\/div>\n<h4>\u041a\u043b\u044e\u0447<\/h4>\n<p>  \u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u043a\u0430\u043a \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u0440\u043e\u0441\u0442\u043e\u0435. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u0430\u043a\u0435\u0442:  <\/p>\n<pre><code>go get github.com\/gogo\/protobuf\/{proto,protoc-gen-gogo,gogoproto,protoc-gen-gofast} <\/code><\/pre>\n<p>  \u042d\u0442\u0438 \u043f\u0430\u043a\u0435\u0442\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442 \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0438 \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u0435.<br \/>  \u041e \u043f\u0430\u043a\u0435\u0442\u0435 (\u0441\u0441\u044b\u043b\u043a\u0438):  <\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/gogo\/protobuf\">github<\/a><\/li>\n<li><a href=\"http:\/\/gogo.github.io\/\">\u0434\u043e\u043c\u0430\u0448\u043d\u044f\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 (<i>\u0430\u043d\u0433\u043b.<\/i>)<\/a><\/li>\n<li><a href=\"http:\/\/gogo.github.io\/bench\/\">\u0442\u0430\u043c \u0436\u0435: \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a\u0438 \u043f\u043e \u0442\u0435\u043c\u0435<\/a><\/li>\n<\/ul>\n<p>  \u041a\u0430\u043a \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u0435 \u043e\u0442 1.10x \u0438 \u0432\u044b\u0448\u0435. \u0415\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0431\u043e\u0440 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0439 \u2014 \u0431\u0435\u0437 \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u044f. \u0415\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e \u0443\u0441\u043a\u043e\u0440\u0438\u0442\u044c. \u042f \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0441\u044f \u043d\u0430 \u044d\u0442\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u0435:  <\/p>\n<pre><code>protoc \\   --proto_path=$GOPATH\/src:$GOPATH\/src\/github.com\/gogo\/protobuf\/protobuf:. \\   --gogofast_out=. *.proto <\/code><\/pre>\n<p> \u0438 \u0412\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 \u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f (\u0435\u0441\u043b\u0438 \u0435\u0441\u0442\u044c) \u0438 \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u0435.  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u043f\u0440\u0438\u043c\u0435\u0440<\/b><\/p>\n<div class=\"spoiler_text\">\u041d\u0435 \u043f\u0440\u0438\u0437\u044b\u0432\u0430\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f, \u043d\u043e \u0434\u043b\u044f \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u043b\u0435\u043d\u0438\u044f.  <\/p>\n<pre><code class=\"objectivec\">syntax=&quot;proto3&quot;;  package some;  \/\/protoc \\ \/\/  --proto_path=$GOPATH\/src:$GOPATH\/src\/github.com\/gogo\/protobuf\/protobuf:. \\ \/\/  --gogofast_out=. *.proto  import &quot;github.com\/gogo\/protobuf\/gogoproto\/gogo.proto&quot;;   \/\/ \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u043e\u0432, \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u043c\u0435\u0442\u043e\u0434 Equal, \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0438\u0434\u0435\u043d\u0442\u0438\u0447\u043d\u043e\u0441\u0442\u044c option (gogoproto.equal_all)            = true; option (gogoproto.goproto_stringer_all) = false; \/\/ Stringer \u0434\u043b\u044f \u0432\u0441\u0435\u0445 (\u0434\u043b\u044f \u0442\u0435\u0441\u0442\u043e\u0432 \u043d\u0443\u0436\u043d\u043e \u044d\u0442\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435) option (gogoproto.stringer_all)         = true; \/\/ \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u043e\u0432 - \u043d\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 option (gogoproto.populate_all)         = true; \/\/ \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043d\u0430\u0431\u043e\u0440\u0430 \u0442\u0435\u0441\u0442\u043e\u0432 option (gogoproto.testgen_all)          = true; \/\/ \u043d\u0430\u0431\u043e\u0440 \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a\u043e\u0432 option (gogoproto.benchgen_all)         = true; \/\/ \u043d\u0443\u0436\u043d\u043e option (gogoproto.marshaler_all)        = true; \/\/ \u0440\u0430\u0437\u043c\u0435\u0440 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f option (gogoproto.sizer_all)            = true; \/\/ \u043d\u0443\u0436\u043d\u043e option (gogoproto.unmarshaler_all)      = true; \/\/ enums, \u043d\u0435 \u0432\u0430\u0436\u043d\u043e - \u044d\u0442\u043e \u0434\u043b\u044f \u043a\u0440\u0430\u0441\u043e\u0442\u044b option (gogoproto.goproto_enum_prefix_all) = false;  enum Bool { \tYes      = 0; \tNo       = 1; \tDontCare = 2; }  message Some { \toption (gogoproto.goproto_unrecognized ) = false; \toption (gogoproto.goproto_getters)       = false; \tBool  Waht  = 1; \tint64 Count = 2; \tbytes Hash  = 3; } <\/code><\/pre>\n<p>  \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f  <\/p>\n<pre><code class=\"go\">\/*     \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0432\u044b\u043f\u0438\u043b\u0435\u043d\u0430     \u0442\u0430\u043c \u0435\u0449\u0451 \u043a\u0443\u0447\u0430 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 (Size, String \u0438 \u0442.\u0434.) \u0438 \u0435\u0449\u0451 \u043e\u0434\u0438\u043d \u0444\u0430\u0439\u043b \u0441 \u0442\u0435\u0441\u0442\u0430\u043c\u0438 *\/ type Bool int32  const ( \tYes      Bool = 0 \tNo       Bool = 1 \tDontCare Bool = 2 )  \/\/ ...  type Some struct { \tWaht  Bool   `protobuf:&quot;varint,1,opt,name=Waht,proto3,enum=some.Bool&quot; json:&quot;Waht,omitempty&quot;` \tCount int64  `protobuf:&quot;varint,2,opt,name=Count,proto3&quot; json:&quot;Count,omitempty&quot;` \tHash  []byte `protobuf:&quot;bytes,3,opt,name=Hash,proto3&quot; json:&quot;Hash,omitempty&quot;` }  \/\/ \u0432\u043e\u043f\u043b\u043e\u0449\u0435\u043d\u0438\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 proto.Message (github.com\/golang\/protobuf\/proto) func (m *Some) Reset()      { *m = Some{} } func (*Some) ProtoMessage() {}  \/\/ \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432\u043e\u0442  func (m *Some) Marshal() (data []byte, err error) { \t\/\/ ... }  \/\/ \u0438 \u0432\u043e\u0442  func (m *Some) Unmarshal(data []byte) error { \t\/\/ ... } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u041a\u0430\u043a \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u0438\u043c\u0435\u044e\u0442 \u0441\u0442\u0430\u0442\u0443\u0441 <i>beta<\/i>, \u0434\u0430 \u0435\u0449\u0451 \u044d\u0442\u043e <a href=\"https:\/\/github.com\/gogo\/protobuf\/issues\/57\">\u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u0435<\/a> \u043f\u043e-\u043f\u043e\u0432\u043e\u0434\u0443 proto3. \u041d\u0435 \u0441\u043e\u043c\u043d\u0435\u0432\u0430\u0439\u0442\u0435\u0441\u044c. \u042d\u0442\u043e\u0442 \u043f\u0430\u043a\u0435\u0442 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043c\u043d\u043e\u0433\u0438\u0435 (\u0441\u043c. \u0434\u043e\u043c\u0430\u0448\u043d\u044e\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443). \u0412\u0441\u0451 \u0436\u0435 \u043e\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0442\u0435\u0441\u0442\u043e\u0432 \u044d\u0442\u043e \u043d\u0435 \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0430\u0435\u0442. \u0415\u0441\u043b\u0438 \u043d\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0442 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u0438 \u043f\u0440\u043e\u0447\u0435\u0435, \u0442\u043e (\u043a\u0430\u043a \u044d\u0442\u043e \u043e\u0442\u043c\u0435\u0447\u0435\u043d\u043e \u0432 README \u043f\u0440\u043e\u0435\u043a\u0442\u0430) \u0432\u043e\u0442 \u044d\u0442\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e:  <\/p>\n<pre><code>protoc --gofast_out=. myproto.proto <\/code><\/pre>\n<h4>\u041a\u0430\u043c\u043d\u0438<\/h4>\n<p>  <i>\u043b\u043e\u0436\u043a\u0430 \u0434\u0451\u0433\u0442\u044f<\/i><\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0412\u044b \u043d\u0435 \u0437\u0430\u0433\u043b\u044f\u043d\u0443\u043b\u0438 \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0439 \u0441\u043f\u043e\u0439\u043b\u0435\u0440, \u0442\u043e \u043e\u0434\u0438\u043d \u0438\u0437 \u0435\u0433\u043e \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u043e\u0432 \u044f \u0445\u043e\u0442\u0435\u043b \u0431\u044b \u043f\u043e\u0434\u0447\u0435\u0440\u043a\u043d\u0443\u0442\u044c, \u0432\u043e\u0442 \u043e\u043d<\/p>\n<pre><code class=\"go\">func (m *Some) Reset()      { *m = Some{} } \/\/ \u043e\u0447\u0435\u043d\u044c \u0433\u0440\u0443\u0431\u043e <\/code><\/pre>\n<p>  \u0414\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e <code>gogo<\/code> \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u00ab\u0431\u044b\u0441\u0442\u0440\u044b\u0435\u00bb \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u0438 \u0441\u043e \u00ab\u0441\u0442\u0430\u0440\u044b\u043c\u00bb <code>github.com\/golang\/protobuf\/proto<\/code>. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043c\u0435\u0442\u043e\u0434\u044b <code>Marshal<\/code> \u0438 <code>Unmarshal<\/code> \u2014 \u0432 \u044d\u0442\u043e\u043c \u043d\u0435\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b. \u041d\u043e \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0412\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0437. \u0415\u0441\u043b\u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0431\u043e\u043b\u044c\u0448\u0430\u044f (\u043d\u0435\u0442, \u043e\u0433\u0440\u043e\u043c\u043d\u0430\u044f), \u0442\u043e \u043f\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u043c\u0443 \u0441\u0447\u0451\u0442\u0443 \u043d\u0435 \u043f\u043e\u043c\u0435\u0448\u0430\u043b\u043e \u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0443\u043b \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u00ab\u043e\u0442\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u044b\u0435\u00bb \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b, \u0430 \u043f\u043e\u0442\u043e\u043c \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0442\u044c \u0438\u0445 \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e.<\/p>\n<p>  \u041f\u043e\u0434\u0445\u043e\u0434 <code>github.com\/golang\/protobuf\/proto<\/code>. <a href=\"https:\/\/github.com\/golang\/protobuf\/blob\/master\/proto\/decode.go#L302\">\u0420\u0435\u0444\u0435\u0440\u0435\u043d\u0441<\/a>.<\/p>\n<pre><code class=\"go\">func Unmarshal(buf []byte, pb Message) error { \tpb.Reset() \/\/ \u0430\u043a\u0446\u0435\u043d\u0442 \u043d\u0430 \u044d\u0442\u043e\u043c \treturn UnmarshalMerge(buf, pb) } <\/code><\/pre>\n<p>  \u0412\u044b\u0437\u043e\u0432 <code>Reset<\/code>. \u0410 \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u0437 <code>*m = Some{}<\/code> \u2014 \u0441\u0442\u0430\u0440\u0430\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0432\u044b\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u043d\u043e\u0432\u0430\u044f \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f. \u042d\u0442\u0430 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0430\u044f \u2014 \u043f\u043b\u0435\u0432\u0430\u0442\u044c \u2014 \u043d\u043e \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c <code>Hash []byte<\/code> (<i>\u0438\u043c\u0435\u044e \u0432\u0432\u0438\u0434\u0443 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u0443\u044e \u043f\u0430\u043c\u044f\u0442\u044c<\/i>), \u043d\u0430 \u0442\u043e\u0442 \u0441\u043b\u0443\u0447\u0430\u0439 \u0435\u0441\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0431\u043e-\u043e-\u043e\u043b\u044c\u0448\u043e\u0439 \u0445\u044d\u0448.<\/p>\n<p>  \u041f\u043e\u0434\u0445\u043e\u0434 <code>github.com\/gogo\/protobuf\/proto<\/code> <a href=\"https:\/\/github.com\/gogo\/protobuf\/blob\/master\/proto\/decode.go#L302\">\u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u0435\u043d<\/a> \u2014 \u00ab\u043a\u043e\u043f\u0438\u043f\u0430\u0441\u0442\u0435\u043d\u00bb. \u041d\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u0441\u043a\u0430.<\/p>\n<p>  \u041d\u0443 \u0447\u0442\u043e \u0436. \u041c\u043e\u0436\u043d\u043e \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434 <code>Unmarshal<\/code> \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0438\u043b\u0438 <code>UnmarshalMerge<\/code> \u2014 \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0432\u043e\u0439 <code>MyReset<\/code> \u043c\u0435\u0442\u043e\u0434, \u0443\u0440\u0435\u0437\u0430\u0442\u044c \u0434\u043b\u0438\u043d\u0443 \u0441\u043b\u0430\u0439\u0441\u0430 \u2014 \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0451\u043c\u043a\u043e\u0441\u0442\u044c. \u041d\u0435\u0442! \u0412\u043e\u0442 \u0441\u0442\u0440\u043e\u043a\u0430 \u0438\u0437 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e <code>Unmarshal<\/code>:<\/p>\n<pre><code class=\"go\">m.Hash = append([]byte{}, data[iNdEx:postIndex]...) <\/code><\/pre>\n<p>  \u041d\u043e\u0432\u044b\u0439 \u0441\u043b\u0430\u0439\u0441 \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u2014 \u0441\u0442\u0430\u0440\u044b\u0439 \u043b\u0435\u0442\u0438\u0442 \u0432 \u0442\u043e\u043f\u043a\u0443 GC. \u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0435\u0441\u043b\u0438 \u0443 \u0412\u0430\u0441 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b (<i>\u043f\u043e\u043b\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440 \u2014 \u0438 \u0432\u0441\u0451 \u0432\u043c\u0435\u0441\u0442\u0435 \u0442\u043e\u0436\u0435<\/i>) \u2014 \u0442\u043e \u043f\u0440\u043e\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u043d\u0435 \u043f\u0430\u0440\u0438\u0442\u044c\u0441\u044f. \u0414\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u2014 \u0438\u0441\u043a\u0430\u0442\u044c \u043e\u0431\u0445\u043e\u0434\u043d\u044b\u0435 \u043f\u0443\u0442\u0438 (\u0447\u0438\u0442\u0430\u0439 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0434). \u041f\u0440\u0438 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0443\u043b \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b\u0430.<\/p>\n<h4>\u0411\u043e\u043d\u0443\u0441<\/h4>\n<p>  <a href=\"https:\/\/godoc.org\/github.com\/gogo\/protobuf\/io\">\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430<\/a> \u0443\u0434\u043e\u0431\u043d\u0430\u044f \u0434\u043b\u044f \u0441\u0442\u0440\u0438\u043c\u043c\u0438\u043d\u0433\u0430. \u0417\u0430\u043f\u0438\u0441\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0432 <code>io.Writer<\/code>, \u0447\u0442\u0435\u043d\u0438\u0435 \u0438\u0437 <code>io.Reader<\/code> \u2014 \u0442\u0430\u043a\u043e\u0439 \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434 \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442.<\/p>\n<p>  \u0420\u0430\u0437 \u0443\u0436 \u0437\u0430\u0448\u0451\u043b \u0440\u0430\u0437\u0433\u043e\u0432\u043e\u0440 \u043e <code>json<\/code>: <a href=\"https:\/\/github.com\/pquerna\/ffjson\">github.com\/pquerna\/ffjson<\/a>. \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0434\u043b\u044f json. \u041d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u2014 \u0430 \u0448\u0432\u0435\u0439\u0446\u0430\u0440\u0441\u043a\u0438\u0439 \u043d\u043e\u0436 \u0434\u043b\u044f <code>json<\/code> + <code>Go<\/code>.<\/p>\n<p>  \u0420\u0430\u0437 \u0443\u0436 \u0437\u0430\u0448\u0451\u043b \u0440\u0430\u0437\u0433\u043e\u0432\u043e\u0440 \u043f\u0440\u043e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0438 \u043f\u0440\u043e \u043f\u0443\u043b: <a href=\"https:\/\/github.com\/valyala\/fasthttp\">github.com\/valyala\/fasthttp<\/a>. \u00ab\u0411\u044b\u0441\u0442\u0440\u0430\u044f\u00bb \u0437\u0430\u043c\u0435\u043d\u0430 <code>net\/http<\/code>. \u0423\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u0435 \u0437\u0430 \u0441\u0447\u0451\u0442 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438. \u0418 \u0442\u043e \u0436\u0435 \u0441 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u043c\u0438.  <\/p>\n<hr\/>\n<div class=\"polling\">\n<form action=\"\/json\/polling\/\" class=\"poll\" method=\"post\">\n<div class=\"poll_title\">\u0444\u043e\u0440\u043c\u0430<\/div>\n<p>  \t\t<input type=\"hidden\" name=\"post_id\" value=\"276905\"\/> \t\t<input type=\"hidden\" name=\"polling_question_id\" value=\"14579\"\/>  \t\t<\/p>\n<table class=\"answer\">\n<tr>\n<td class=\"input\"> \t\t\t\t\t<input type=\"radio\" id=\"vv71289\" \t\t\t\t\t\tclass=\"radio js-field-data\" \t\t\t\t\t\tname=\"variant[]\" \t\t\t\t\t\tvalue=\"71289\" \/> \t\t\t\t<\/td>\n<td class=\"label\"> \t\t\t\t\t<label for=\"vv71289\">\u0441\u0443\u043c\u0431\u0443\u0440\u043d\u043e\/\u043d\u0430\u043c\u0435\u0448\u0430\u043d\u043e<\/label> \t\t\t\t<\/td>\n<\/tr>\n<tr>\n<td class=\"input\"> \t\t\t\t\t<input type=\"radio\" id=\"vv71291\" \t\t\t\t\t\tclass=\"radio js-field-data\" \t\t\t\t\t\tname=\"variant[]\" \t\t\t\t\t\tvalue=\"71291\" \/> \t\t\t\t<\/td>\n<td class=\"label\"> \t\t\t\t\t<label for=\"vv71291\">\u043d\u043e\u0440\u043c<\/label> \t\t\t\t<\/td>\n<\/tr>\n<tr>\n<td class=\"input\"> \t\t\t\t\t<input type=\"radio\" id=\"vv71293\" \t\t\t\t\t\tclass=\"radio js-field-data\" \t\t\t\t\t\tname=\"variant[]\" \t\t\t\t\t\tvalue=\"71293\" \/> \t\t\t\t<\/td>\n<td class=\"label\"> \t\t\t\t\t<label for=\"vv71293\">\u043c\u043d\u043e\u0433\u043e\u0432\u0430\u0442\u043e<\/label> \t\t\t\t<\/td>\n<\/tr>\n<\/table>\n<p class=\"total\">\u041d\u0438\u043a\u0442\u043e \u0435\u0449\u0451 \u043d\u0435 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043b. \u0412\u043e\u0437\u0434\u0435\u0440\u0436\u0430\u0432\u0448\u0438\u0445\u0441\u044f \u043d\u0435\u0442.<\/p>\n<\/p><\/form>\n<form action=\"\/json\/polling\/\" class=\"poll\" method=\"post\">\n<div class=\"poll_title\">\u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435<\/div>\n<p>  \t\t<input type=\"hidden\" name=\"post_id\" value=\"276905\"\/> \t\t<input type=\"hidden\" name=\"polling_question_id\" value=\"14581\"\/>  \t\t<\/p>\n<table class=\"answer\">\n<tr>\n<td class=\"input\"> \t\t\t\t\t<input type=\"radio\" id=\"vv71295\" \t\t\t\t\t\tclass=\"radio js-field-data\" \t\t\t\t\t\tname=\"variant[]\" \t\t\t\t\t\tvalue=\"71295\" \/> \t\t\t\t<\/td>\n<td class=\"label\"> \t\t\t\t\t<label for=\"vv71295\">\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=\"vv71297\" \t\t\t\t\t\tclass=\"radio js-field-data\" \t\t\t\t\t\tname=\"variant[]\" \t\t\t\t\t\tvalue=\"71297\" \/> \t\t\t\t<\/td>\n<td class=\"label\"> \t\t\t\t\t<label for=\"vv71297\">50\/50 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e<\/label> \t\t\t\t<\/td>\n<\/tr>\n<tr>\n<td class=\"input\"> \t\t\t\t\t<input type=\"radio\" id=\"vv71299\" \t\t\t\t\t\tclass=\"radio js-field-data\" \t\t\t\t\t\tname=\"variant[]\" \t\t\t\t\t\tvalue=\"71299\" \/> \t\t\t\t<\/td>\n<td class=\"label\"> \t\t\t\t\t<label for=\"vv71299\">\u0435\u0441\u0442\u044c \u043a\u043e\u0435 \u0447\u0442\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435<\/label> \t\t\t\t<\/td>\n<\/tr>\n<\/table>\n<p class=\"total\">\u041d\u0438\u043a\u0442\u043e \u0435\u0449\u0451 \u043d\u0435 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043b. \u0412\u043e\u0437\u0434\u0435\u0440\u0436\u0430\u0432\u0448\u0438\u0445\u0441\u044f \u043d\u0435\u0442.<\/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=\"https:\/\/habrahabr.ru\/post\/276905\/\"> https:\/\/habrahabr.ru\/post\/276905\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       \u041d\u0435\u043a\u043e\u0435 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habrahabr.ru\/post\/252455\/\">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)<\/a>. \u041f\u0440\u043e\u0446\u0435\u0441\u0441\u044b \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f\/\u0434\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0435 \u0444\u043e\u0440\u043c\u0430\u0442\u044b \u0432 Go \u0442\u0435\u0441\u043d\u043e \u0441\u0432\u044f\u0437\u044f\u043d\u044b \u0441 \u0440\u0435\u0444\u043b\u0435\u043a\u0441\u0438\u0435\u0439. \u0410 \u043a\u0430\u043a \u043c\u044b \u0441 \u0412\u0430\u043c\u0438, \u0434\u043e\u0440\u043e\u0433\u043e\u0439 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044c, \u0437\u043d\u0430\u0435\u043c \u2014 \u0440\u0435\u0444\u043b\u0435\u043a\u0441\u0438\u044f \u2014 \u044d\u0442\u043e \u0434\u043e\u043b\u0433\u043e. \u041e \u0442\u043e\u043c \u043a\u0430\u043a\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0431\u043e\u0440\u044c\u0431\u044b \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u044d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f. \u0414\u0443\u043c\u0430\u044e \u0447\u0442\u043e, \u0438\u0441\u043a\u0443\u0448\u0451\u043d\u043d\u044b\u0435 \u0432\u0440\u044f\u0434 \u043b\u0438 \u043d\u0430\u0439\u0434\u0443\u0442 \u0432 \u043d\u0435\u0439, \u0447\u0442\u043e-\u043b\u0438\u0431\u043e \u043d\u043e\u0432\u043e\u0435.  <\/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-273936","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/273936","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=273936"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/273936\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=273936"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=273936"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=273936"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}