Skip to content

Commit a06052d

Browse files
committed
Run gofmt -s to simplifiy.
1 parent 8d89a90 commit a06052d

File tree

3 files changed

+37
-37
lines changed

3 files changed

+37
-37
lines changed

examples/fixtures.go

+8-8
Original file line numberDiff line numberDiff line change
@@ -8,31 +8,31 @@ func fixtureBlogCreate(i int) *Blog {
88
Title: "Title 1",
99
CreatedAt: time.Now(),
1010
Posts: []*Post{
11-
&Post{
11+
{
1212
ID: 1 * i,
1313
Title: "Foo",
1414
Body: "Bar",
1515
Comments: []*Comment{
16-
&Comment{
16+
{
1717
ID: 1 * i,
1818
Body: "foo",
1919
},
20-
&Comment{
20+
{
2121
ID: 2 * i,
2222
Body: "bar",
2323
},
2424
},
2525
},
26-
&Post{
26+
{
2727
ID: 2 * i,
2828
Title: "Fuubar",
2929
Body: "Bas",
3030
Comments: []*Comment{
31-
&Comment{
31+
{
3232
ID: 1 * i,
3333
Body: "foo",
3434
},
35-
&Comment{
35+
{
3636
ID: 3 * i,
3737
Body: "bas",
3838
},
@@ -44,11 +44,11 @@ func fixtureBlogCreate(i int) *Blog {
4444
Title: "Foo",
4545
Body: "Bar",
4646
Comments: []*Comment{
47-
&Comment{
47+
{
4848
ID: 1 * i,
4949
Body: "foo",
5050
},
51-
&Comment{
51+
{
5252
ID: 2 * i,
5353
Body: "bar",
5454
},

request_test.go

+12-12
Original file line numberDiff line numberDiff line change
@@ -753,15 +753,15 @@ func samplePayload() io.Reader {
753753
Relationships: map[string]interface{}{
754754
"posts": &RelationshipManyNode{
755755
Data: []*Node{
756-
&Node{
756+
{
757757
Type: "posts",
758758
Attributes: map[string]interface{}{
759759
"title": "Foo",
760760
"body": "Bar",
761761
},
762762
ClientID: "1",
763763
},
764-
&Node{
764+
{
765765
Type: "posts",
766766
Attributes: map[string]interface{}{
767767
"title": "X",
@@ -782,14 +782,14 @@ func samplePayload() io.Reader {
782782
Relationships: map[string]interface{}{
783783
"comments": &RelationshipManyNode{
784784
Data: []*Node{
785-
&Node{
785+
{
786786
Type: "comments",
787787
Attributes: map[string]interface{}{
788788
"body": "Great post!",
789789
},
790790
ClientID: "4",
791791
},
792-
&Node{
792+
{
793793
Type: "comments",
794794
Attributes: map[string]interface{}{
795795
"body": "Needs some work!",
@@ -866,16 +866,16 @@ func testModel() *Blog {
866866
Title: "Title 1",
867867
CreatedAt: time.Now(),
868868
Posts: []*Post{
869-
&Post{
869+
{
870870
ID: 1,
871871
Title: "Foo",
872872
Body: "Bar",
873873
Comments: []*Comment{
874-
&Comment{
874+
{
875875
ID: 1,
876876
Body: "foo",
877877
},
878-
&Comment{
878+
{
879879
ID: 2,
880880
Body: "bar",
881881
},
@@ -885,16 +885,16 @@ func testModel() *Blog {
885885
Body: "foo",
886886
},
887887
},
888-
&Post{
888+
{
889889
ID: 2,
890890
Title: "Fuubar",
891891
Body: "Bas",
892892
Comments: []*Comment{
893-
&Comment{
893+
{
894894
ID: 1,
895895
Body: "foo",
896896
},
897-
&Comment{
897+
{
898898
ID: 3,
899899
Body: "bas",
900900
},
@@ -910,11 +910,11 @@ func testModel() *Blog {
910910
Title: "Foo",
911911
Body: "Bar",
912912
Comments: []*Comment{
913-
&Comment{
913+
{
914914
ID: 1,
915915
Body: "foo",
916916
},
917-
&Comment{
917+
{
918918
ID: 2,
919919
Body: "bar",
920920
},

response_test.go

+17-17
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111

1212
func TestMarshalPayload(t *testing.T) {
1313
book := &Book{ID: 1}
14-
books := []*Book{book, &Book{ID: 2}}
14+
books := []*Book{book, {ID: 2}}
1515
var jsonData map[string]interface{}
1616

1717
// One
@@ -623,11 +623,11 @@ func TestMarshalPayloadWithoutIncluded(t *testing.T) {
623623
Title: "Foo",
624624
Body: "Bar",
625625
Comments: []*Comment{
626-
&Comment{
626+
{
627627
ID: 20,
628628
Body: "First",
629629
},
630-
&Comment{
630+
{
631631
ID: 21,
632632
Body: "Hello World",
633633
},
@@ -660,12 +660,12 @@ func TestMarshalPayload_many(t *testing.T) {
660660
Title: "Title 1",
661661
CreatedAt: time.Now(),
662662
Posts: []*Post{
663-
&Post{
663+
{
664664
ID: 1,
665665
Title: "Foo",
666666
Body: "Bar",
667667
},
668-
&Post{
668+
{
669669
ID: 2,
670670
Title: "Fuubar",
671671
Body: "Bas",
@@ -682,12 +682,12 @@ func TestMarshalPayload_many(t *testing.T) {
682682
Title: "Title 2",
683683
CreatedAt: time.Now(),
684684
Posts: []*Post{
685-
&Post{
685+
{
686686
ID: 3,
687687
Title: "Foo",
688688
Body: "Bar",
689689
},
690-
&Post{
690+
{
691691
ID: 4,
692692
Title: "Fuubar",
693693
Body: "Bas",
@@ -770,8 +770,8 @@ func TestMarshalManyWithoutIncluded(t *testing.T) {
770770

771771
func TestMarshalMany_SliceOfInterfaceAndSliceOfStructsSameJSON(t *testing.T) {
772772
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"},
775775
}
776776
interfaces := []interface{}{}
777777
for _, s := range structs {
@@ -823,16 +823,16 @@ func testBlog() *Blog {
823823
Title: "Title 1",
824824
CreatedAt: time.Now(),
825825
Posts: []*Post{
826-
&Post{
826+
{
827827
ID: 1,
828828
Title: "Foo",
829829
Body: "Bar",
830830
Comments: []*Comment{
831-
&Comment{
831+
{
832832
ID: 1,
833833
Body: "foo",
834834
},
835-
&Comment{
835+
{
836836
ID: 2,
837837
Body: "bar",
838838
},
@@ -842,16 +842,16 @@ func testBlog() *Blog {
842842
Body: "foo",
843843
},
844844
},
845-
&Post{
845+
{
846846
ID: 2,
847847
Title: "Fuubar",
848848
Body: "Bas",
849849
Comments: []*Comment{
850-
&Comment{
850+
{
851851
ID: 1,
852852
Body: "foo",
853853
},
854-
&Comment{
854+
{
855855
ID: 3,
856856
Body: "bas",
857857
},
@@ -867,11 +867,11 @@ func testBlog() *Blog {
867867
Title: "Foo",
868868
Body: "Bar",
869869
Comments: []*Comment{
870-
&Comment{
870+
{
871871
ID: 1,
872872
Body: "foo",
873873
},
874-
&Comment{
874+
{
875875
ID: 2,
876876
Body: "bar",
877877
},

0 commit comments

Comments
 (0)