diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 2b2c7df..b01e6d8 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -16,7 +16,7 @@ jobs: fetch-depth: 0 - name: Setup Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v4 with: go-version-file: go.mod @@ -24,7 +24,7 @@ jobs: uses: goreleaser/goreleaser-action@v4 with: distribution: goreleaser - version: v1.16.1 + version: v1.18.2 args: release --clean --timeout 30m env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 31b600d..ea50252 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -20,15 +20,15 @@ jobs: fail-fast: false matrix: tinygo-version: - - "0.25.0" - "0.26.0" - "0.27.0" + - "0.28.1" steps: - uses: actions/checkout@v3 - name: Set up Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v4 with: go-version-file: go.mod diff --git a/examples/helloworld/greeting/greet_vtproto.pb.go b/examples/helloworld/greeting/greet_vtproto.pb.go index dc0a8c3..4b9dc87 100644 --- a/examples/helloworld/greeting/greet_vtproto.pb.go +++ b/examples/helloworld/greeting/greet_vtproto.pb.go @@ -121,9 +121,7 @@ func (m *GreetRequest) SizeVT() (n int) { if l > 0 { n += 1 + l + sov(uint64(l)) } - if m.unknownFields != nil { - n += len(m.unknownFields) - } + n += len(m.unknownFields) return n } @@ -137,9 +135,7 @@ func (m *GreetReply) SizeVT() (n int) { if l > 0 { n += 1 + l + sov(uint64(l)) } - if m.unknownFields != nil { - n += len(m.unknownFields) - } + n += len(m.unknownFields) return n } @@ -315,6 +311,7 @@ func (m *GreetReply) UnmarshalVT(dAtA []byte) error { } return nil } + func skip(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/examples/host-function-library/library/json-parser/export/library_vtproto.pb.go b/examples/host-function-library/library/json-parser/export/library_vtproto.pb.go index 0c151e4..69c188d 100644 --- a/examples/host-function-library/library/json-parser/export/library_vtproto.pb.go +++ b/examples/host-function-library/library/json-parser/export/library_vtproto.pb.go @@ -169,9 +169,7 @@ func (m *ParseJsonRequest) SizeVT() (n int) { if l > 0 { n += 1 + l + sov(uint64(l)) } - if m.unknownFields != nil { - n += len(m.unknownFields) - } + n += len(m.unknownFields) return n } @@ -185,9 +183,7 @@ func (m *ParseJsonResponse) SizeVT() (n int) { l = m.Response.SizeVT() n += 1 + l + sov(uint64(l)) } - if m.unknownFields != nil { - n += len(m.unknownFields) - } + n += len(m.unknownFields) return n } @@ -204,9 +200,7 @@ func (m *Person) SizeVT() (n int) { if m.Age != 0 { n += 1 + sov(uint64(m.Age)) } - if m.unknownFields != nil { - n += len(m.unknownFields) - } + n += len(m.unknownFields) return n } @@ -490,6 +484,7 @@ func (m *Person) UnmarshalVT(dAtA []byte) error { } return nil } + func skip(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/examples/host-function-library/proto/greet_vtproto.pb.go b/examples/host-function-library/proto/greet_vtproto.pb.go index 1245f63..202edd0 100644 --- a/examples/host-function-library/proto/greet_vtproto.pb.go +++ b/examples/host-function-library/proto/greet_vtproto.pb.go @@ -201,9 +201,7 @@ func (m *GreetRequest) SizeVT() (n int) { if l > 0 { n += 1 + l + sov(uint64(l)) } - if m.unknownFields != nil { - n += len(m.unknownFields) - } + n += len(m.unknownFields) return n } @@ -217,9 +215,7 @@ func (m *GreetReply) SizeVT() (n int) { if l > 0 { n += 1 + l + sov(uint64(l)) } - if m.unknownFields != nil { - n += len(m.unknownFields) - } + n += len(m.unknownFields) return n } @@ -233,9 +229,7 @@ func (m *SanRequest) SizeVT() (n int) { if l > 0 { n += 1 + l + sov(uint64(l)) } - if m.unknownFields != nil { - n += len(m.unknownFields) - } + n += len(m.unknownFields) return n } @@ -249,9 +243,7 @@ func (m *SanResponse) SizeVT() (n int) { if l > 0 { n += 1 + l + sov(uint64(l)) } - if m.unknownFields != nil { - n += len(m.unknownFields) - } + n += len(m.unknownFields) return n } @@ -593,6 +585,7 @@ func (m *SanResponse) UnmarshalVT(dAtA []byte) error { } return nil } + func skip(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/examples/host-functions/greeting/greet_vtproto.pb.go b/examples/host-functions/greeting/greet_vtproto.pb.go index 234318d..9a43754 100644 --- a/examples/host-functions/greeting/greet_vtproto.pb.go +++ b/examples/host-functions/greeting/greet_vtproto.pb.go @@ -241,9 +241,7 @@ func (m *GreetRequest) SizeVT() (n int) { if l > 0 { n += 1 + l + sov(uint64(l)) } - if m.unknownFields != nil { - n += len(m.unknownFields) - } + n += len(m.unknownFields) return n } @@ -257,9 +255,7 @@ func (m *GreetReply) SizeVT() (n int) { if l > 0 { n += 1 + l + sov(uint64(l)) } - if m.unknownFields != nil { - n += len(m.unknownFields) - } + n += len(m.unknownFields) return n } @@ -273,9 +269,7 @@ func (m *HttpGetRequest) SizeVT() (n int) { if l > 0 { n += 1 + l + sov(uint64(l)) } - if m.unknownFields != nil { - n += len(m.unknownFields) - } + n += len(m.unknownFields) return n } @@ -289,9 +283,7 @@ func (m *HttpGetResponse) SizeVT() (n int) { if l > 0 { n += 1 + l + sov(uint64(l)) } - if m.unknownFields != nil { - n += len(m.unknownFields) - } + n += len(m.unknownFields) return n } @@ -305,9 +297,7 @@ func (m *LogRequest) SizeVT() (n int) { if l > 0 { n += 1 + l + sov(uint64(l)) } - if m.unknownFields != nil { - n += len(m.unknownFields) - } + n += len(m.unknownFields) return n } @@ -734,6 +724,7 @@ func (m *LogRequest) UnmarshalVT(dAtA []byte) error { } return nil } + func skip(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/examples/known-types/known/known_vtproto.pb.go b/examples/known-types/known/known_vtproto.pb.go index 33bda6a..3005bd3 100644 --- a/examples/known-types/known/known_vtproto.pb.go +++ b/examples/known-types/known/known_vtproto.pb.go @@ -55,10 +55,10 @@ func (m *DiffRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { copy(dAtA[i:], m.unknownFields) } if m.End != nil { - if marshalto, ok := interface{}(m.End).(interface { + if vtmsg, ok := interface{}(m.End).(interface { MarshalToSizedBufferVT([]byte) (int, error) }); ok { - size, err := marshalto.MarshalToSizedBufferVT(dAtA[:i]) + size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } @@ -77,10 +77,10 @@ func (m *DiffRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { dAtA[i] = 0x1a } if m.Start != nil { - if marshalto, ok := interface{}(m.Start).(interface { + if vtmsg, ok := interface{}(m.Start).(interface { MarshalToSizedBufferVT([]byte) (int, error) }); ok { - size, err := marshalto.MarshalToSizedBufferVT(dAtA[:i]) + size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } @@ -99,10 +99,10 @@ func (m *DiffRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { dAtA[i] = 0x12 } if m.Value != nil { - if marshalto, ok := interface{}(m.Value).(interface { + if vtmsg, ok := interface{}(m.Value).(interface { MarshalToSizedBufferVT([]byte) (int, error) }); ok { - size, err := marshalto.MarshalToSizedBufferVT(dAtA[:i]) + size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } @@ -154,10 +154,10 @@ func (m *DiffReply) MarshalToSizedBufferVT(dAtA []byte) (int, error) { copy(dAtA[i:], m.unknownFields) } if m.Duration != nil { - if marshalto, ok := interface{}(m.Duration).(interface { + if vtmsg, ok := interface{}(m.Duration).(interface { MarshalToSizedBufferVT([]byte) (int, error) }); ok { - size, err := marshalto.MarshalToSizedBufferVT(dAtA[:i]) + size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } @@ -225,9 +225,7 @@ func (m *DiffRequest) SizeVT() (n int) { } n += 1 + l + sov(uint64(l)) } - if m.unknownFields != nil { - n += len(m.unknownFields) - } + n += len(m.unknownFields) return n } @@ -247,9 +245,7 @@ func (m *DiffReply) SizeVT() (n int) { } n += 1 + l + sov(uint64(l)) } - if m.unknownFields != nil { - n += len(m.unknownFields) - } + n += len(m.unknownFields) return n } @@ -537,6 +533,7 @@ func (m *DiffReply) UnmarshalVT(dAtA []byte) error { } return nil } + func skip(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/examples/wasi/cat/cat_vtproto.pb.go b/examples/wasi/cat/cat_vtproto.pb.go index c7ee444..28e8e3b 100644 --- a/examples/wasi/cat/cat_vtproto.pb.go +++ b/examples/wasi/cat/cat_vtproto.pb.go @@ -121,9 +121,7 @@ func (m *FileCatRequest) SizeVT() (n int) { if l > 0 { n += 1 + l + sov(uint64(l)) } - if m.unknownFields != nil { - n += len(m.unknownFields) - } + n += len(m.unknownFields) return n } @@ -137,9 +135,7 @@ func (m *FileCatReply) SizeVT() (n int) { if l > 0 { n += 1 + l + sov(uint64(l)) } - if m.unknownFields != nil { - n += len(m.unknownFields) - } + n += len(m.unknownFields) return n } @@ -315,6 +311,7 @@ func (m *FileCatReply) UnmarshalVT(dAtA []byte) error { } return nil } + func skip(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/go.mod b/go.mod index e09f46c..9323f9a 100644 --- a/go.mod +++ b/go.mod @@ -3,14 +3,14 @@ module github.com/knqyf263/go-plugin go 1.18 require ( - github.com/planetscale/vtprotobuf v0.3.0 - github.com/stretchr/testify v1.7.1 - github.com/tetratelabs/wazero v1.0.2 - google.golang.org/protobuf v1.28.1 + github.com/planetscale/vtprotobuf v0.4.0 + github.com/stretchr/testify v1.8.4 + github.com/tetratelabs/wazero v1.2.1 + google.golang.org/protobuf v1.30.0 ) require ( - github.com/davecgh/go-spew v1.1.0 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 38b5bf6..d1997cc 100644 --- a/go.sum +++ b/go.sum @@ -1,25 +1,28 @@ -github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/planetscale/vtprotobuf v0.3.0 h1:oMrOdDFHS1ADc0dHtC2EApxiM5xd0cQkZeibm0WgXiQ= -github.com/planetscale/vtprotobuf v0.3.0/go.mod h1:wm1N3qk9G/4+VM1WhpkLbvY/d8+0PbwYYpP5P5VhTks= +github.com/planetscale/vtprotobuf v0.4.0 h1:NEI+g4woRaAZgeZ3sAvbtyvMBRjIv5kE7EWYQ8m4JwY= +github.com/planetscale/vtprotobuf v0.4.0/go.mod h1:wm1N3qk9G/4+VM1WhpkLbvY/d8+0PbwYYpP5P5VhTks= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/tetratelabs/wazero v1.0.2 h1:lpwL5zczFHk2mxKur98035Gig+Z3vd9JURk6lUdZxXY= -github.com/tetratelabs/wazero v1.0.2/go.mod h1:wYx2gNRg8/WihJfSDxA1TIL8H+GkfLYm+bIfbblu9VQ= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/tetratelabs/wazero v1.2.1 h1:J4X2hrGzJvt+wqltuvcSjHQ7ujQxA9gb6PeMs4qlUWs= +github.com/tetratelabs/wazero v1.2.1/go.mod h1:wYx2gNRg8/WihJfSDxA1TIL8H+GkfLYm+bIfbblu9VQ= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= +google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/tests/fields/proto/fields_vtproto.pb.go b/tests/fields/proto/fields_vtproto.pb.go index dd716c9..74fcfb6 100644 --- a/tests/fields/proto/fields_vtproto.pb.go +++ b/tests/fields/proto/fields_vtproto.pb.go @@ -597,9 +597,7 @@ func (m *TestEmptyInputResponse) SizeVT() (n int) { if m.Ok { n += 2 } - if m.unknownFields != nil { - n += len(m.unknownFields) - } + n += len(m.unknownFields) return n } @@ -613,9 +611,7 @@ func (m *Request_Nested) SizeVT() (n int) { if l > 0 { n += 1 + l + sov(uint64(l)) } - if m.unknownFields != nil { - n += len(m.unknownFields) - } + n += len(m.unknownFields) return n } @@ -698,9 +694,7 @@ func (m *Request) SizeVT() (n int) { if m.S != 0 { n += 2 + sov(uint64(m.S)) } - if m.unknownFields != nil { - n += len(m.unknownFields) - } + n += len(m.unknownFields) return n } @@ -713,9 +707,7 @@ func (m *IntValue) SizeVT() (n int) { if m.A != 0 { n += 1 + sov(uint64(m.A)) } - if m.unknownFields != nil { - n += len(m.unknownFields) - } + n += len(m.unknownFields) return n } @@ -729,9 +721,7 @@ func (m *Response_Nested) SizeVT() (n int) { if l > 0 { n += 1 + l + sov(uint64(l)) } - if m.unknownFields != nil { - n += len(m.unknownFields) - } + n += len(m.unknownFields) return n } @@ -814,9 +804,7 @@ func (m *Response) SizeVT() (n int) { if m.S != 0 { n += 2 + sov(uint64(m.S)) } - if m.unknownFields != nil { - n += len(m.unknownFields) - } + n += len(m.unknownFields) return n } @@ -830,9 +818,7 @@ func (m *ErrorRequest) SizeVT() (n int) { if l > 0 { n += 1 + l + sov(uint64(l)) } - if m.unknownFields != nil { - n += len(m.unknownFields) - } + n += len(m.unknownFields) return n } @@ -2298,6 +2284,7 @@ func (m *ErrorRequest) UnmarshalVT(dAtA []byte) error { } return nil } + func skip(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/tests/host-functions/proto/host_vtproto.pb.go b/tests/host-functions/proto/host_vtproto.pb.go index 666b887..be45a75 100644 --- a/tests/host-functions/proto/host_vtproto.pb.go +++ b/tests/host-functions/proto/host_vtproto.pb.go @@ -249,9 +249,7 @@ func (m *GreetRequest) SizeVT() (n int) { if l > 0 { n += 1 + l + sov(uint64(l)) } - if m.unknownFields != nil { - n += len(m.unknownFields) - } + n += len(m.unknownFields) return n } @@ -265,9 +263,7 @@ func (m *GreetReply) SizeVT() (n int) { if l > 0 { n += 1 + l + sov(uint64(l)) } - if m.unknownFields != nil { - n += len(m.unknownFields) - } + n += len(m.unknownFields) return n } @@ -281,9 +277,7 @@ func (m *ParseJsonRequest) SizeVT() (n int) { if l > 0 { n += 1 + l + sov(uint64(l)) } - if m.unknownFields != nil { - n += len(m.unknownFields) - } + n += len(m.unknownFields) return n } @@ -297,9 +291,7 @@ func (m *ParseJsonResponse) SizeVT() (n int) { l = m.Response.SizeVT() n += 1 + l + sov(uint64(l)) } - if m.unknownFields != nil { - n += len(m.unknownFields) - } + n += len(m.unknownFields) return n } @@ -316,9 +308,7 @@ func (m *Person) SizeVT() (n int) { if m.Age != 0 { n += 1 + sov(uint64(m.Age)) } - if m.unknownFields != nil { - n += len(m.unknownFields) - } + n += len(m.unknownFields) return n } @@ -768,6 +758,7 @@ func (m *Person) UnmarshalVT(dAtA []byte) error { } return nil } + func skip(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/tests/import/proto/bar/bar_vtproto.pb.go b/tests/import/proto/bar/bar_vtproto.pb.go index 0ad02e0..c7f2089 100644 --- a/tests/import/proto/bar/bar_vtproto.pb.go +++ b/tests/import/proto/bar/bar_vtproto.pb.go @@ -121,9 +121,7 @@ func (m *Request) SizeVT() (n int) { if l > 0 { n += 1 + l + sov(uint64(l)) } - if m.unknownFields != nil { - n += len(m.unknownFields) - } + n += len(m.unknownFields) return n } @@ -137,9 +135,7 @@ func (m *Reply) SizeVT() (n int) { if l > 0 { n += 1 + l + sov(uint64(l)) } - if m.unknownFields != nil { - n += len(m.unknownFields) - } + n += len(m.unknownFields) return n } @@ -315,6 +311,7 @@ func (m *Reply) UnmarshalVT(dAtA []byte) error { } return nil } + func skip(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/tests/import/proto/foo/foo_vtproto.pb.go b/tests/import/proto/foo/foo_vtproto.pb.go index d3087e6..d3cf116 100644 --- a/tests/import/proto/foo/foo_vtproto.pb.go +++ b/tests/import/proto/foo/foo_vtproto.pb.go @@ -81,9 +81,7 @@ func (m *Request) SizeVT() (n int) { if l > 0 { n += 1 + l + sov(uint64(l)) } - if m.unknownFields != nil { - n += len(m.unknownFields) - } + n += len(m.unknownFields) return n } @@ -176,6 +174,7 @@ func (m *Request) UnmarshalVT(dAtA []byte) error { } return nil } + func skip(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/tests/well-known/proto/known_vtproto.pb.go b/tests/well-known/proto/known_vtproto.pb.go index 00fb537..b7ebf05 100644 --- a/tests/well-known/proto/known_vtproto.pb.go +++ b/tests/well-known/proto/known_vtproto.pb.go @@ -56,10 +56,10 @@ func (m *Request) MarshalToSizedBufferVT(dAtA []byte) (int, error) { copy(dAtA[i:], m.unknownFields) } if m.L != nil { - if marshalto, ok := interface{}(m.L).(interface { + if vtmsg, ok := interface{}(m.L).(interface { MarshalToSizedBufferVT([]byte) (int, error) }); ok { - size, err := marshalto.MarshalToSizedBufferVT(dAtA[:i]) + size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } @@ -78,10 +78,10 @@ func (m *Request) MarshalToSizedBufferVT(dAtA []byte) (int, error) { dAtA[i] = 0x62 } if m.K != nil { - if marshalto, ok := interface{}(m.K).(interface { + if vtmsg, ok := interface{}(m.K).(interface { MarshalToSizedBufferVT([]byte) (int, error) }); ok { - size, err := marshalto.MarshalToSizedBufferVT(dAtA[:i]) + size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } @@ -100,10 +100,10 @@ func (m *Request) MarshalToSizedBufferVT(dAtA []byte) (int, error) { dAtA[i] = 0x5a } if m.J != nil { - if marshalto, ok := interface{}(m.J).(interface { + if vtmsg, ok := interface{}(m.J).(interface { MarshalToSizedBufferVT([]byte) (int, error) }); ok { - size, err := marshalto.MarshalToSizedBufferVT(dAtA[:i]) + size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } @@ -122,10 +122,10 @@ func (m *Request) MarshalToSizedBufferVT(dAtA []byte) (int, error) { dAtA[i] = 0x52 } if m.I != nil { - if marshalto, ok := interface{}(m.I).(interface { + if vtmsg, ok := interface{}(m.I).(interface { MarshalToSizedBufferVT([]byte) (int, error) }); ok { - size, err := marshalto.MarshalToSizedBufferVT(dAtA[:i]) + size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } @@ -144,10 +144,10 @@ func (m *Request) MarshalToSizedBufferVT(dAtA []byte) (int, error) { dAtA[i] = 0x4a } if m.H != nil { - if marshalto, ok := interface{}(m.H).(interface { + if vtmsg, ok := interface{}(m.H).(interface { MarshalToSizedBufferVT([]byte) (int, error) }); ok { - size, err := marshalto.MarshalToSizedBufferVT(dAtA[:i]) + size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } @@ -166,10 +166,10 @@ func (m *Request) MarshalToSizedBufferVT(dAtA []byte) (int, error) { dAtA[i] = 0x42 } if m.G != nil { - if marshalto, ok := interface{}(m.G).(interface { + if vtmsg, ok := interface{}(m.G).(interface { MarshalToSizedBufferVT([]byte) (int, error) }); ok { - size, err := marshalto.MarshalToSizedBufferVT(dAtA[:i]) + size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } @@ -188,10 +188,10 @@ func (m *Request) MarshalToSizedBufferVT(dAtA []byte) (int, error) { dAtA[i] = 0x3a } if m.F != nil { - if marshalto, ok := interface{}(m.F).(interface { + if vtmsg, ok := interface{}(m.F).(interface { MarshalToSizedBufferVT([]byte) (int, error) }); ok { - size, err := marshalto.MarshalToSizedBufferVT(dAtA[:i]) + size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } @@ -210,10 +210,10 @@ func (m *Request) MarshalToSizedBufferVT(dAtA []byte) (int, error) { dAtA[i] = 0x32 } if m.E != nil { - if marshalto, ok := interface{}(m.E).(interface { + if vtmsg, ok := interface{}(m.E).(interface { MarshalToSizedBufferVT([]byte) (int, error) }); ok { - size, err := marshalto.MarshalToSizedBufferVT(dAtA[:i]) + size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } @@ -232,10 +232,10 @@ func (m *Request) MarshalToSizedBufferVT(dAtA []byte) (int, error) { dAtA[i] = 0x2a } if m.D != nil { - if marshalto, ok := interface{}(m.D).(interface { + if vtmsg, ok := interface{}(m.D).(interface { MarshalToSizedBufferVT([]byte) (int, error) }); ok { - size, err := marshalto.MarshalToSizedBufferVT(dAtA[:i]) + size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } @@ -254,10 +254,10 @@ func (m *Request) MarshalToSizedBufferVT(dAtA []byte) (int, error) { dAtA[i] = 0x22 } if m.C != nil { - if marshalto, ok := interface{}(m.C).(interface { + if vtmsg, ok := interface{}(m.C).(interface { MarshalToSizedBufferVT([]byte) (int, error) }); ok { - size, err := marshalto.MarshalToSizedBufferVT(dAtA[:i]) + size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } @@ -276,10 +276,10 @@ func (m *Request) MarshalToSizedBufferVT(dAtA []byte) (int, error) { dAtA[i] = 0x1a } if m.B != nil { - if marshalto, ok := interface{}(m.B).(interface { + if vtmsg, ok := interface{}(m.B).(interface { MarshalToSizedBufferVT([]byte) (int, error) }); ok { - size, err := marshalto.MarshalToSizedBufferVT(dAtA[:i]) + size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } @@ -298,10 +298,10 @@ func (m *Request) MarshalToSizedBufferVT(dAtA []byte) (int, error) { dAtA[i] = 0x12 } if m.A != nil { - if marshalto, ok := interface{}(m.A).(interface { + if vtmsg, ok := interface{}(m.A).(interface { MarshalToSizedBufferVT([]byte) (int, error) }); ok { - size, err := marshalto.MarshalToSizedBufferVT(dAtA[:i]) + size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } @@ -353,10 +353,10 @@ func (m *Response) MarshalToSizedBufferVT(dAtA []byte) (int, error) { copy(dAtA[i:], m.unknownFields) } if m.L != nil { - if marshalto, ok := interface{}(m.L).(interface { + if vtmsg, ok := interface{}(m.L).(interface { MarshalToSizedBufferVT([]byte) (int, error) }); ok { - size, err := marshalto.MarshalToSizedBufferVT(dAtA[:i]) + size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } @@ -375,10 +375,10 @@ func (m *Response) MarshalToSizedBufferVT(dAtA []byte) (int, error) { dAtA[i] = 0x62 } if m.K != nil { - if marshalto, ok := interface{}(m.K).(interface { + if vtmsg, ok := interface{}(m.K).(interface { MarshalToSizedBufferVT([]byte) (int, error) }); ok { - size, err := marshalto.MarshalToSizedBufferVT(dAtA[:i]) + size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } @@ -397,10 +397,10 @@ func (m *Response) MarshalToSizedBufferVT(dAtA []byte) (int, error) { dAtA[i] = 0x5a } if m.J != nil { - if marshalto, ok := interface{}(m.J).(interface { + if vtmsg, ok := interface{}(m.J).(interface { MarshalToSizedBufferVT([]byte) (int, error) }); ok { - size, err := marshalto.MarshalToSizedBufferVT(dAtA[:i]) + size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } @@ -419,10 +419,10 @@ func (m *Response) MarshalToSizedBufferVT(dAtA []byte) (int, error) { dAtA[i] = 0x52 } if m.I != nil { - if marshalto, ok := interface{}(m.I).(interface { + if vtmsg, ok := interface{}(m.I).(interface { MarshalToSizedBufferVT([]byte) (int, error) }); ok { - size, err := marshalto.MarshalToSizedBufferVT(dAtA[:i]) + size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } @@ -441,10 +441,10 @@ func (m *Response) MarshalToSizedBufferVT(dAtA []byte) (int, error) { dAtA[i] = 0x4a } if m.H != nil { - if marshalto, ok := interface{}(m.H).(interface { + if vtmsg, ok := interface{}(m.H).(interface { MarshalToSizedBufferVT([]byte) (int, error) }); ok { - size, err := marshalto.MarshalToSizedBufferVT(dAtA[:i]) + size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } @@ -463,10 +463,10 @@ func (m *Response) MarshalToSizedBufferVT(dAtA []byte) (int, error) { dAtA[i] = 0x42 } if m.G != nil { - if marshalto, ok := interface{}(m.G).(interface { + if vtmsg, ok := interface{}(m.G).(interface { MarshalToSizedBufferVT([]byte) (int, error) }); ok { - size, err := marshalto.MarshalToSizedBufferVT(dAtA[:i]) + size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } @@ -485,10 +485,10 @@ func (m *Response) MarshalToSizedBufferVT(dAtA []byte) (int, error) { dAtA[i] = 0x3a } if m.F != nil { - if marshalto, ok := interface{}(m.F).(interface { + if vtmsg, ok := interface{}(m.F).(interface { MarshalToSizedBufferVT([]byte) (int, error) }); ok { - size, err := marshalto.MarshalToSizedBufferVT(dAtA[:i]) + size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } @@ -507,10 +507,10 @@ func (m *Response) MarshalToSizedBufferVT(dAtA []byte) (int, error) { dAtA[i] = 0x32 } if m.E != nil { - if marshalto, ok := interface{}(m.E).(interface { + if vtmsg, ok := interface{}(m.E).(interface { MarshalToSizedBufferVT([]byte) (int, error) }); ok { - size, err := marshalto.MarshalToSizedBufferVT(dAtA[:i]) + size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } @@ -529,10 +529,10 @@ func (m *Response) MarshalToSizedBufferVT(dAtA []byte) (int, error) { dAtA[i] = 0x2a } if m.D != nil { - if marshalto, ok := interface{}(m.D).(interface { + if vtmsg, ok := interface{}(m.D).(interface { MarshalToSizedBufferVT([]byte) (int, error) }); ok { - size, err := marshalto.MarshalToSizedBufferVT(dAtA[:i]) + size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } @@ -551,10 +551,10 @@ func (m *Response) MarshalToSizedBufferVT(dAtA []byte) (int, error) { dAtA[i] = 0x22 } if m.C != nil { - if marshalto, ok := interface{}(m.C).(interface { + if vtmsg, ok := interface{}(m.C).(interface { MarshalToSizedBufferVT([]byte) (int, error) }); ok { - size, err := marshalto.MarshalToSizedBufferVT(dAtA[:i]) + size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } @@ -573,10 +573,10 @@ func (m *Response) MarshalToSizedBufferVT(dAtA []byte) (int, error) { dAtA[i] = 0x1a } if m.B != nil { - if marshalto, ok := interface{}(m.B).(interface { + if vtmsg, ok := interface{}(m.B).(interface { MarshalToSizedBufferVT([]byte) (int, error) }); ok { - size, err := marshalto.MarshalToSizedBufferVT(dAtA[:i]) + size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } @@ -595,10 +595,10 @@ func (m *Response) MarshalToSizedBufferVT(dAtA []byte) (int, error) { dAtA[i] = 0x12 } if m.A != nil { - if marshalto, ok := interface{}(m.A).(interface { + if vtmsg, ok := interface{}(m.A).(interface { MarshalToSizedBufferVT([]byte) (int, error) }); ok { - size, err := marshalto.MarshalToSizedBufferVT(dAtA[:i]) + size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } @@ -756,9 +756,7 @@ func (m *Request) SizeVT() (n int) { } n += 1 + l + sov(uint64(l)) } - if m.unknownFields != nil { - n += len(m.unknownFields) - } + n += len(m.unknownFields) return n } @@ -888,9 +886,7 @@ func (m *Response) SizeVT() (n int) { } n += 1 + l + sov(uint64(l)) } - if m.unknownFields != nil { - n += len(m.unknownFields) - } + n += len(m.unknownFields) return n } @@ -2058,6 +2054,7 @@ func (m *Response) UnmarshalVT(dAtA []byte) error { } return nil } + func skip(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/types/known/anypb/any_vtproto.pb.go b/types/known/anypb/any_vtproto.pb.go index 2197434..9336330 100644 --- a/types/known/anypb/any_vtproto.pb.go +++ b/types/known/anypb/any_vtproto.pb.go @@ -97,9 +97,7 @@ func (m *Any) SizeVT() (n int) { if l > 0 { n += 1 + l + sov(uint64(l)) } - if m.unknownFields != nil { - n += len(m.unknownFields) - } + n += len(m.unknownFields) return n } @@ -226,6 +224,7 @@ func (m *Any) UnmarshalVT(dAtA []byte) error { } return nil } + func skip(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/types/known/durationpb/duration_vtproto.pb.go b/types/known/durationpb/duration_vtproto.pb.go index 3bc27aa..35ecdb8 100644 --- a/types/known/durationpb/duration_vtproto.pb.go +++ b/types/known/durationpb/duration_vtproto.pb.go @@ -91,9 +91,7 @@ func (m *Duration) SizeVT() (n int) { if m.Nanos != 0 { n += 1 + sov(uint64(m.Nanos)) } - if m.unknownFields != nil { - n += len(m.unknownFields) - } + n += len(m.unknownFields) return n } @@ -192,6 +190,7 @@ func (m *Duration) UnmarshalVT(dAtA []byte) error { } return nil } + func skip(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/types/known/emptypb/empty_vtproto.pb.go b/types/known/emptypb/empty_vtproto.pb.go index 15e3c8b..6bacaf6 100644 --- a/types/known/emptypb/empty_vtproto.pb.go +++ b/types/known/emptypb/empty_vtproto.pb.go @@ -75,9 +75,7 @@ func (m *Empty) SizeVT() (n int) { } var l int _ = l - if m.unknownFields != nil { - n += len(m.unknownFields) - } + n += len(m.unknownFields) return n } @@ -138,6 +136,7 @@ func (m *Empty) UnmarshalVT(dAtA []byte) error { } return nil } + func skip(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/types/known/sourcecontextpb/source_context_vtproto.pb.go b/types/known/sourcecontextpb/source_context_vtproto.pb.go index d1aad05..994686b 100644 --- a/types/known/sourcecontextpb/source_context_vtproto.pb.go +++ b/types/known/sourcecontextpb/source_context_vtproto.pb.go @@ -86,9 +86,7 @@ func (m *SourceContext) SizeVT() (n int) { if l > 0 { n += 1 + l + sov(uint64(l)) } - if m.unknownFields != nil { - n += len(m.unknownFields) - } + n += len(m.unknownFields) return n } @@ -181,6 +179,7 @@ func (m *SourceContext) UnmarshalVT(dAtA []byte) error { } return nil } + func skip(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/types/known/structpb/struct_vtproto.pb.go b/types/known/structpb/struct_vtproto.pb.go index d074ff4..ab26c85 100644 --- a/types/known/structpb/struct_vtproto.pb.go +++ b/types/known/structpb/struct_vtproto.pb.go @@ -113,16 +113,13 @@ func (m *Value) MarshalToSizedBufferVT(dAtA []byte) (int, error) { copy(dAtA[i:], m.unknownFields) } if vtmsg, ok := m.Kind.(interface { - MarshalToVT([]byte) (int, error) - SizeVT() int + MarshalToSizedBufferVT([]byte) (int, error) }); ok { - { - size := vtmsg.SizeVT() - i -= size - if _, err := vtmsg.MarshalToVT(dAtA[i:]); err != nil { - return 0, err - } + size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err } + i -= size } return len(dAtA) - i, nil } @@ -296,9 +293,7 @@ func (m *Struct) SizeVT() (n int) { n += mapEntrySize + 1 + sov(uint64(mapEntrySize)) } } - if m.unknownFields != nil { - n += len(m.unknownFields) - } + n += len(m.unknownFields) return n } @@ -311,9 +306,7 @@ func (m *Value) SizeVT() (n int) { if vtmsg, ok := m.Kind.(interface{ SizeVT() int }); ok { n += vtmsg.SizeVT() } - if m.unknownFields != nil { - n += len(m.unknownFields) - } + n += len(m.unknownFields) return n } @@ -390,9 +383,7 @@ func (m *ListValue) SizeVT() (n int) { n += 1 + l + sov(uint64(l)) } } - if m.unknownFields != nil { - n += len(m.unknownFields) - } + n += len(m.unknownFields) return n } @@ -630,7 +621,7 @@ func (m *Value) UnmarshalVT(dAtA []byte) error { break } } - m.Kind = &Value_NullValue{v} + m.Kind = &Value_NullValue{NullValue: v} case 2: if wireType != 1 { return fmt.Errorf("proto: wrong wireType = %d for field NumberValue", wireType) @@ -641,7 +632,7 @@ func (m *Value) UnmarshalVT(dAtA []byte) error { } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 - m.Kind = &Value_NumberValue{float64(math.Float64frombits(v))} + m.Kind = &Value_NumberValue{NumberValue: float64(math.Float64frombits(v))} case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field StringValue", wireType) @@ -672,7 +663,7 @@ func (m *Value) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Kind = &Value_StringValue{string(dAtA[iNdEx:postIndex])} + m.Kind = &Value_StringValue{StringValue: string(dAtA[iNdEx:postIndex])} iNdEx = postIndex case 4: if wireType != 0 { @@ -694,7 +685,7 @@ func (m *Value) UnmarshalVT(dAtA []byte) error { } } b := bool(v != 0) - m.Kind = &Value_BoolValue{b} + m.Kind = &Value_BoolValue{BoolValue: b} case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field StructValue", wireType) @@ -733,7 +724,7 @@ func (m *Value) UnmarshalVT(dAtA []byte) error { if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } - m.Kind = &Value_StructValue{v} + m.Kind = &Value_StructValue{StructValue: v} } iNdEx = postIndex case 6: @@ -774,7 +765,7 @@ func (m *Value) UnmarshalVT(dAtA []byte) error { if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } - m.Kind = &Value_ListValue{v} + m.Kind = &Value_ListValue{ListValue: v} } iNdEx = postIndex default: @@ -884,6 +875,7 @@ func (m *ListValue) UnmarshalVT(dAtA []byte) error { } return nil } + func skip(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/types/known/timestamppb/timestamp_vtproto.pb.go b/types/known/timestamppb/timestamp_vtproto.pb.go index 74d0a9b..69ed15f 100644 --- a/types/known/timestamppb/timestamp_vtproto.pb.go +++ b/types/known/timestamppb/timestamp_vtproto.pb.go @@ -91,9 +91,7 @@ func (m *Timestamp) SizeVT() (n int) { if m.Nanos != 0 { n += 1 + sov(uint64(m.Nanos)) } - if m.unknownFields != nil { - n += len(m.unknownFields) - } + n += len(m.unknownFields) return n } @@ -192,6 +190,7 @@ func (m *Timestamp) UnmarshalVT(dAtA []byte) error { } return nil } + func skip(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/types/known/typepb/type_vtproto.pb.go b/types/known/typepb/type_vtproto.pb.go index 2752dfe..02cadfc 100644 --- a/types/known/typepb/type_vtproto.pb.go +++ b/types/known/typepb/type_vtproto.pb.go @@ -450,9 +450,7 @@ func (m *Type) SizeVT() (n int) { if m.Syntax != 0 { n += 1 + sov(uint64(m.Syntax)) } - if m.unknownFields != nil { - n += len(m.unknownFields) - } + n += len(m.unknownFields) return n } @@ -499,9 +497,7 @@ func (m *Field) SizeVT() (n int) { if l > 0 { n += 1 + l + sov(uint64(l)) } - if m.unknownFields != nil { - n += len(m.unknownFields) - } + n += len(m.unknownFields) return n } @@ -534,9 +530,7 @@ func (m *Enum) SizeVT() (n int) { if m.Syntax != 0 { n += 1 + sov(uint64(m.Syntax)) } - if m.unknownFields != nil { - n += len(m.unknownFields) - } + n += len(m.unknownFields) return n } @@ -559,9 +553,7 @@ func (m *EnumValue) SizeVT() (n int) { n += 1 + l + sov(uint64(l)) } } - if m.unknownFields != nil { - n += len(m.unknownFields) - } + n += len(m.unknownFields) return n } @@ -579,9 +571,7 @@ func (m *Option) SizeVT() (n int) { l = m.Value.SizeVT() n += 1 + l + sov(uint64(l)) } - if m.unknownFields != nil { - n += len(m.unknownFields) - } + n += len(m.unknownFields) return n } @@ -1599,6 +1589,7 @@ func (m *Option) UnmarshalVT(dAtA []byte) error { } return nil } + func skip(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/types/known/wrapperspb/wrappers_vtproto.pb.go b/types/known/wrapperspb/wrappers_vtproto.pb.go index 08d06e9..1333e09 100644 --- a/types/known/wrapperspb/wrappers_vtproto.pb.go +++ b/types/known/wrapperspb/wrappers_vtproto.pb.go @@ -400,9 +400,7 @@ func (m *DoubleValue) SizeVT() (n int) { if m.Value != 0 { n += 9 } - if m.unknownFields != nil { - n += len(m.unknownFields) - } + n += len(m.unknownFields) return n } @@ -415,9 +413,7 @@ func (m *FloatValue) SizeVT() (n int) { if m.Value != 0 { n += 5 } - if m.unknownFields != nil { - n += len(m.unknownFields) - } + n += len(m.unknownFields) return n } @@ -430,9 +426,7 @@ func (m *Int64Value) SizeVT() (n int) { if m.Value != 0 { n += 1 + sov(uint64(m.Value)) } - if m.unknownFields != nil { - n += len(m.unknownFields) - } + n += len(m.unknownFields) return n } @@ -445,9 +439,7 @@ func (m *UInt64Value) SizeVT() (n int) { if m.Value != 0 { n += 1 + sov(uint64(m.Value)) } - if m.unknownFields != nil { - n += len(m.unknownFields) - } + n += len(m.unknownFields) return n } @@ -460,9 +452,7 @@ func (m *Int32Value) SizeVT() (n int) { if m.Value != 0 { n += 1 + sov(uint64(m.Value)) } - if m.unknownFields != nil { - n += len(m.unknownFields) - } + n += len(m.unknownFields) return n } @@ -475,9 +465,7 @@ func (m *UInt32Value) SizeVT() (n int) { if m.Value != 0 { n += 1 + sov(uint64(m.Value)) } - if m.unknownFields != nil { - n += len(m.unknownFields) - } + n += len(m.unknownFields) return n } @@ -490,9 +478,7 @@ func (m *BoolValue) SizeVT() (n int) { if m.Value { n += 2 } - if m.unknownFields != nil { - n += len(m.unknownFields) - } + n += len(m.unknownFields) return n } @@ -506,9 +492,7 @@ func (m *StringValue) SizeVT() (n int) { if l > 0 { n += 1 + l + sov(uint64(l)) } - if m.unknownFields != nil { - n += len(m.unknownFields) - } + n += len(m.unknownFields) return n } @@ -522,9 +506,7 @@ func (m *BytesValue) SizeVT() (n int) { if l > 0 { n += 1 + l + sov(uint64(l)) } - if m.unknownFields != nil { - n += len(m.unknownFields) - } + n += len(m.unknownFields) return n } @@ -1177,6 +1159,7 @@ func (m *BytesValue) UnmarshalVT(dAtA []byte) error { } return nil } + func skip(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0