MCPcopy Create free account
hub / github.com/google/gapid / checkMessageEncodes

Function checkMessageEncodes

gapil/bapi/encode.go:2205–2216  ·  view source on GitHub ↗

Help debug `proto: bapi.Content: illegal tag 0 (wire type 0)` errors

(v interface{})

Source from the content-addressed store, hash-verified

2203
2204// Help debug `proto: bapi.Content: illegal tag 0 (wire type 0)` errors
2205func checkMessageEncodes(v interface{}) {
2206 if false {
2207 if isNil(v) {
2208 return
2209 }
2210 if msg, ok := v.(proto.Message); ok {
2211 if _, err := proto.Marshal(msg); err != nil {
2212 panic(err)
2213 }
2214 }
2215 }
2216}
2217
2218func isNil(v interface{}) bool {
2219 if v == nil {

Callers 2

astNodeMethod · 0.85
buildMethod · 0.85

Calls 1

isNilFunction · 0.70

Tested by

no test coverage detected