1
0
mirror of https://github.com/json-iterator/go.git synced 2025-06-21 23:07:33 +02:00

fix go vet

This commit is contained in:
Tao Wen
2017-07-09 11:24:26 +08:00
parent 6d0e6f3733
commit 9ecb1fd36d
6 changed files with 17 additions and 16 deletions

@ -44,7 +44,7 @@ func ExampleUnmarshal() {
// [{Name:Platypus Order:Monotremata} {Name:Quoll Order:Dasyuromorphia}]
}
func ExampleMarshalWithBestPerformance() {
func ExampleConfigFastest_Marshal() {
type ColorGroup struct {
ID int
Name string
@ -66,7 +66,7 @@ func ExampleMarshalWithBestPerformance() {
// {"ID":1,"Name":"Reds","Colors":["Crimson","Red","Ruby","Maroon"]}
}
func ExampleUnmarshalWithBestPerformance() {
func ExampleConfigFastest_Unmarshal() {
var jsonBlob = []byte(`[
{"Name": "Platypus", "Order": "Monotremata"},
{"Name": "Quoll", "Order": "Dasyuromorphia"}
@ -87,7 +87,7 @@ func ExampleUnmarshalWithBestPerformance() {
// [{Name:Platypus Order:Monotremata} {Name:Quoll Order:Dasyuromorphia}]
}
func ExampleOneLine() {
func ExampleGet() {
val := []byte(`{"ID":1,"Name":"Reds","Colors":["Crimson","Red","Ruby","Maroon"]}`)
fmt.Printf(Get(val, "Colors", 0).ToString())
// Output: