Skip to content

Commit

Permalink
update example for map
Browse files Browse the repository at this point in the history
  • Loading branch information
name5566 committed Jun 24, 2016
1 parent 1217c63 commit 51a5aa1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions recordfile/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ func Example() {
Name string "name"
Num int "num"
}
M map[string]int
}

rf, err := recordfile.New(Record{})
Expand Down Expand Up @@ -49,6 +50,7 @@ func Example() {
fmt.Println(r.Arr2[2][0])
fmt.Println(r.Arr3[0])
fmt.Println(r.St.Name)
fmt.Println(r.M["key6"])

// Output:
// 1
Expand All @@ -61,4 +63,5 @@ func Example() {
// 4
// 6
// name5566
// 6
}
Binary file modified recordfile/test.txt
Binary file not shown.

0 comments on commit 51a5aa1

Please sign in to comment.