()
| 11 | } |
| 12 | |
| 13 | func main() { |
| 14 | e := Example{ |
| 15 | I: 1, |
| 16 | S: "2", |
| 17 | } |
| 18 | b, err := e.MarshalMsg(nil) |
| 19 | if err != nil { |
| 20 | panic(err) |
| 21 | } |
| 22 | |
| 23 | var e2 Example |
| 24 | extra, err := e2.UnmarshalMsg(b) |
| 25 | if err != nil { |
| 26 | panic(err) |
| 27 | } |
| 28 | if len(extra) != 0 { |
| 29 | panic("unexpected extra") |
| 30 | } |
| 31 | |
| 32 | if e.I != e2.I || e.S != e2.S { |
| 33 | panic("not equal") |
| 34 | } |
| 35 | |
| 36 | println("done, len(b):", len(b)) |
| 37 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…