diff options
author | 2021-05-24 14:24:12 -0700 | |
---|---|---|
committer | 2021-07-23 11:12:05 -0700 | |
commit | 4591b6496deaffa6fa9f21ae546e2815e510866d (patch) | |
tree | 9323db61272009afcda4cc31854f8352abed4a68 /cmd/sbox/sbox.go | |
parent | 00d21ce8a5dec6529221fc57e1799e8c39648d07 (diff) |
Upgrade to golang protobuf api v2
Major operations:
* Fix the go_package entries to be consistent, as the new tool
complains when it doesn't have a '/'.
* Regenerate with the new protoc-gen-go tool.
* github.com/golang/protobuf -> google.golang.org/protobuf
* proto.[Un]MarshalText -> prototext.[Un]Marshal
Change-Id: Ie1147bd2457fafb66ba555461b3bf14f0561a25d
Diffstat (limited to 'cmd/sbox/sbox.go')
-rw-r--r-- | cmd/sbox/sbox.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/sbox/sbox.go b/cmd/sbox/sbox.go index f124e40b0..c7f3f6a44 100644 --- a/cmd/sbox/sbox.go +++ b/cmd/sbox/sbox.go @@ -34,7 +34,7 @@ import ( "android/soong/makedeps" "android/soong/response" - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/encoding/prototext" ) var ( @@ -203,7 +203,7 @@ func readManifest(file string) (*sbox_proto.Manifest, error) { manifest := sbox_proto.Manifest{} - err = proto.UnmarshalText(string(manifestData), &manifest) + err = prototext.Unmarshal(manifestData, &manifest) if err != nil { return nil, fmt.Errorf("error parsing manifest %q: %w", file, err) } |