Help debug `proto: bapi.Content: illegal tag 0 (wire type 0)` errors
(v interface{})
| 2203 | |
| 2204 | // Help debug `proto: bapi.Content: illegal tag 0 (wire type 0)` errors |
| 2205 | func 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 | |
| 2218 | func isNil(v interface{}) bool { |
| 2219 | if v == nil { |