func ExampleInstruction() { var i x.Instruction i.SubjectId = "sid" i.SubjectType = "stype" b, err := i.GobEncode() if err != nil { panic(err) } var o x.Instruction if err := o.GobDecode(b); err != nil { panic(err) } fmt.Println(o.SubjectId) fmt.Println(o.SubjectType) // Output: // sid // stype }