Skip to content

Commit

Permalink
Run gofmt -s to simplifiy.
Browse files Browse the repository at this point in the history
  • Loading branch information
aren55555 committed Sep 13, 2017
1 parent 8d89a90 commit a06052d
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 37 deletions.
16 changes: 8 additions & 8 deletions examples/fixtures.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,31 @@ func fixtureBlogCreate(i int) *Blog {
Title: "Title 1",
CreatedAt: time.Now(),
Posts: []*Post{
&Post{
{
ID: 1 * i,
Title: "Foo",
Body: "Bar",
Comments: []*Comment{
&Comment{
{
ID: 1 * i,
Body: "foo",
},
&Comment{
{
ID: 2 * i,
Body: "bar",
},
},
},
&Post{
{
ID: 2 * i,
Title: "Fuubar",
Body: "Bas",
Comments: []*Comment{
&Comment{
{
ID: 1 * i,
Body: "foo",
},
&Comment{
{
ID: 3 * i,
Body: "bas",
},
Expand All @@ -44,11 +44,11 @@ func fixtureBlogCreate(i int) *Blog {
Title: "Foo",
Body: "Bar",
Comments: []*Comment{
&Comment{
{
ID: 1 * i,
Body: "foo",
},
&Comment{
{
ID: 2 * i,
Body: "bar",
},
Expand Down
24 changes: 12 additions & 12 deletions request_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -753,15 +753,15 @@ func samplePayload() io.Reader {
Relationships: map[string]interface{}{
"posts": &RelationshipManyNode{
Data: []*Node{
&Node{
{
Type: "posts",
Attributes: map[string]interface{}{
"title": "Foo",
"body": "Bar",
},
ClientID: "1",
},
&Node{
{
Type: "posts",
Attributes: map[string]interface{}{
"title": "X",
Expand All @@ -782,14 +782,14 @@ func samplePayload() io.Reader {
Relationships: map[string]interface{}{
"comments": &RelationshipManyNode{
Data: []*Node{
&Node{
{
Type: "comments",
Attributes: map[string]interface{}{
"body": "Great post!",
},
ClientID: "4",
},
&Node{
{
Type: "comments",
Attributes: map[string]interface{}{
"body": "Needs some work!",
Expand Down Expand Up @@ -866,16 +866,16 @@ func testModel() *Blog {
Title: "Title 1",
CreatedAt: time.Now(),
Posts: []*Post{
&Post{
{
ID: 1,
Title: "Foo",
Body: "Bar",
Comments: []*Comment{
&Comment{
{
ID: 1,
Body: "foo",
},
&Comment{
{
ID: 2,
Body: "bar",
},
Expand All @@ -885,16 +885,16 @@ func testModel() *Blog {
Body: "foo",
},
},
&Post{
{
ID: 2,
Title: "Fuubar",
Body: "Bas",
Comments: []*Comment{
&Comment{
{
ID: 1,
Body: "foo",
},
&Comment{
{
ID: 3,
Body: "bas",
},
Expand All @@ -910,11 +910,11 @@ func testModel() *Blog {
Title: "Foo",
Body: "Bar",
Comments: []*Comment{
&Comment{
{
ID: 1,
Body: "foo",
},
&Comment{
{
ID: 2,
Body: "bar",
},
Expand Down
34 changes: 17 additions & 17 deletions response_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

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

// One
Expand Down Expand Up @@ -623,11 +623,11 @@ func TestMarshalPayloadWithoutIncluded(t *testing.T) {
Title: "Foo",
Body: "Bar",
Comments: []*Comment{
&Comment{
{
ID: 20,
Body: "First",
},
&Comment{
{
ID: 21,
Body: "Hello World",
},
Expand Down Expand Up @@ -660,12 +660,12 @@ func TestMarshalPayload_many(t *testing.T) {
Title: "Title 1",
CreatedAt: time.Now(),
Posts: []*Post{
&Post{
{
ID: 1,
Title: "Foo",
Body: "Bar",
},
&Post{
{
ID: 2,
Title: "Fuubar",
Body: "Bas",
Expand All @@ -682,12 +682,12 @@ func TestMarshalPayload_many(t *testing.T) {
Title: "Title 2",
CreatedAt: time.Now(),
Posts: []*Post{
&Post{
{
ID: 3,
Title: "Foo",
Body: "Bar",
},
&Post{
{
ID: 4,
Title: "Fuubar",
Body: "Bas",
Expand Down Expand Up @@ -770,8 +770,8 @@ func TestMarshalManyWithoutIncluded(t *testing.T) {

func TestMarshalMany_SliceOfInterfaceAndSliceOfStructsSameJSON(t *testing.T) {
structs := []*Book{
&Book{ID: 1, Author: "aren55555", ISBN: "abc"},
&Book{ID: 2, Author: "shwoodard", ISBN: "xyz"},
{ID: 1, Author: "aren55555", ISBN: "abc"},
{ID: 2, Author: "shwoodard", ISBN: "xyz"},
}
interfaces := []interface{}{}
for _, s := range structs {
Expand Down Expand Up @@ -823,16 +823,16 @@ func testBlog() *Blog {
Title: "Title 1",
CreatedAt: time.Now(),
Posts: []*Post{
&Post{
{
ID: 1,
Title: "Foo",
Body: "Bar",
Comments: []*Comment{
&Comment{
{
ID: 1,
Body: "foo",
},
&Comment{
{
ID: 2,
Body: "bar",
},
Expand All @@ -842,16 +842,16 @@ func testBlog() *Blog {
Body: "foo",
},
},
&Post{
{
ID: 2,
Title: "Fuubar",
Body: "Bas",
Comments: []*Comment{
&Comment{
{
ID: 1,
Body: "foo",
},
&Comment{
{
ID: 3,
Body: "bas",
},
Expand All @@ -867,11 +867,11 @@ func testBlog() *Blog {
Title: "Foo",
Body: "Bar",
Comments: []*Comment{
&Comment{
{
ID: 1,
Body: "foo",
},
&Comment{
{
ID: 2,
Body: "bar",
},
Expand Down

0 comments on commit a06052d

Please sign in to comment.