Skip to content

Commit

Permalink
gofmt
Browse files Browse the repository at this point in the history
  • Loading branch information
rjeczalik committed Jan 23, 2014
1 parent d7b4e27 commit 629e931
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
28 changes: 14 additions & 14 deletions encode_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,29 +75,29 @@ func TestEncode(t *testing.T) {
SliceOfMixedArrays [][2]interface{}
ArrayOfMixedSlices [2][]interface{}
}{
[][2]int{[2]int{1, 2}, [2]int{3, 4}},
[2][]int{[]int{1, 2}, []int{3, 4}},
[][2]int{{1, 2}, {3, 4}},
[2][]int{{1, 2}, {3, 4}},
[][2][]int{
[2][]int{
[]int{1, 2}, []int{3, 4},
{
{1, 2}, {3, 4},
},
[2][]int{
[]int{5, 6}, []int{7, 8},
{
{5, 6}, {7, 8},
},
},
[2][][2]int{
[][2]int{
[2]int{1, 2}, [2]int{3, 4},
{
{1, 2}, {3, 4},
},
[][2]int{
[2]int{5, 6}, [2]int{7, 8},
{
{5, 6}, {7, 8},
},
},
[][2]interface{}{
[2]interface{}{1, 2}, [2]interface{}{"a", "b"},
{1, 2}, {"a", "b"},
},
[2][]interface{}{
[]interface{}{1, 2}, []interface{}{"a", "b"},
{1, 2}, {"a", "b"},
},
},
wantOutput: `SliceOfArrays = [[1, 2], [3, 4]]
Expand Down Expand Up @@ -162,8 +162,8 @@ ArrayOfMixedSlices = [[1, 2], ["a", "b"]]`,
},
"nested map": {
input: map[string]map[string]int{
"a": map[string]int{"b": 1},
"c": map[string]int{"d": 2},
"a": {"b": 1},
"c": {"d": 2},
},
wantOutput: "[a]\n b = 1\n\n[c]\n d = 2",
},
Expand Down
4 changes: 2 additions & 2 deletions toml-test-encoder/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ func translate(typedJson interface{}) interface{} {
if m, ok := translate(v[i]).(map[string]interface{}); ok {
tabArray[i] = m
} else {
log.Fatalf("JSON arrays may only contain objects. This "+
"corresponds to only tables being allowed in "+
log.Fatalf("JSON arrays may only contain objects. This " +
"corresponds to only tables being allowed in " +
"TOML table arrays.")
}
}
Expand Down

0 comments on commit 629e931

Please sign in to comment.