@@ -11,7 +11,7 @@ import (
11
11
12
12
func TestMarshalPayload (t * testing.T ) {
13
13
book := & Book {ID : 1 }
14
- books := []* Book {book , & Book {ID : 2 }}
14
+ books := []* Book {book , {ID : 2 }}
15
15
var jsonData map [string ]interface {}
16
16
17
17
// One
@@ -623,11 +623,11 @@ func TestMarshalPayloadWithoutIncluded(t *testing.T) {
623
623
Title : "Foo" ,
624
624
Body : "Bar" ,
625
625
Comments : []* Comment {
626
- & Comment {
626
+ {
627
627
ID : 20 ,
628
628
Body : "First" ,
629
629
},
630
- & Comment {
630
+ {
631
631
ID : 21 ,
632
632
Body : "Hello World" ,
633
633
},
@@ -660,12 +660,12 @@ func TestMarshalPayload_many(t *testing.T) {
660
660
Title : "Title 1" ,
661
661
CreatedAt : time .Now (),
662
662
Posts : []* Post {
663
- & Post {
663
+ {
664
664
ID : 1 ,
665
665
Title : "Foo" ,
666
666
Body : "Bar" ,
667
667
},
668
- & Post {
668
+ {
669
669
ID : 2 ,
670
670
Title : "Fuubar" ,
671
671
Body : "Bas" ,
@@ -682,12 +682,12 @@ func TestMarshalPayload_many(t *testing.T) {
682
682
Title : "Title 2" ,
683
683
CreatedAt : time .Now (),
684
684
Posts : []* Post {
685
- & Post {
685
+ {
686
686
ID : 3 ,
687
687
Title : "Foo" ,
688
688
Body : "Bar" ,
689
689
},
690
- & Post {
690
+ {
691
691
ID : 4 ,
692
692
Title : "Fuubar" ,
693
693
Body : "Bas" ,
@@ -770,8 +770,8 @@ func TestMarshalManyWithoutIncluded(t *testing.T) {
770
770
771
771
func TestMarshalMany_SliceOfInterfaceAndSliceOfStructsSameJSON (t * testing.T ) {
772
772
structs := []* Book {
773
- & Book {ID : 1 , Author : "aren55555" , ISBN : "abc" },
774
- & Book {ID : 2 , Author : "shwoodard" , ISBN : "xyz" },
773
+ {ID : 1 , Author : "aren55555" , ISBN : "abc" },
774
+ {ID : 2 , Author : "shwoodard" , ISBN : "xyz" },
775
775
}
776
776
interfaces := []interface {}{}
777
777
for _ , s := range structs {
@@ -823,16 +823,16 @@ func testBlog() *Blog {
823
823
Title : "Title 1" ,
824
824
CreatedAt : time .Now (),
825
825
Posts : []* Post {
826
- & Post {
826
+ {
827
827
ID : 1 ,
828
828
Title : "Foo" ,
829
829
Body : "Bar" ,
830
830
Comments : []* Comment {
831
- & Comment {
831
+ {
832
832
ID : 1 ,
833
833
Body : "foo" ,
834
834
},
835
- & Comment {
835
+ {
836
836
ID : 2 ,
837
837
Body : "bar" ,
838
838
},
@@ -842,16 +842,16 @@ func testBlog() *Blog {
842
842
Body : "foo" ,
843
843
},
844
844
},
845
- & Post {
845
+ {
846
846
ID : 2 ,
847
847
Title : "Fuubar" ,
848
848
Body : "Bas" ,
849
849
Comments : []* Comment {
850
- & Comment {
850
+ {
851
851
ID : 1 ,
852
852
Body : "foo" ,
853
853
},
854
- & Comment {
854
+ {
855
855
ID : 3 ,
856
856
Body : "bas" ,
857
857
},
@@ -867,11 +867,11 @@ func testBlog() *Blog {
867
867
Title : "Foo" ,
868
868
Body : "Bar" ,
869
869
Comments : []* Comment {
870
- & Comment {
870
+ {
871
871
ID : 1 ,
872
872
Body : "foo" ,
873
873
},
874
- & Comment {
874
+ {
875
875
ID : 2 ,
876
876
Body : "bar" ,
877
877
},
0 commit comments