There have two examples:
fun Marshal: You can see the example are not contain any button.
func ExampleMarshal() { type Item struct { Foo string } b, err := msgpack.Marshal(&Item{Foo: "bar"}) if err != nil { panic(err) } var item Item err = msgpack.Unmarshal(b, &item) if err != nil { panic(err) } fmt.Println(item.Foo) // Output: bar }
func Reverse well it has three buttons: Share, Format, Run
func ExampleReverse() { s := []int{5, 2, 6, 3, 1, 4} // unsorted sort.Sort(sort.Reverse(sort.IntSlice(s))) fmt.Println(s) // Output: [6 5 4 3 2 1] }
I don't understand why one has buttons, and the other doesn't? Does the content (godoc) rendered have anything to do with the version of Go used in the repository?