MCPcopy
hub / github.com/tinylib/msgp / main

Function main

tinygotest/testdata/simple_roundtrip/main.go:13–37  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

11}
12
13func 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}

Callers

nothing calls this directly

Calls 2

MarshalMsgMethod · 0.65
UnmarshalMsgMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…