Run gofmt -s to simplifiy.

This commit is contained in:
Aren Patel 2017-09-13 12:59:59 -07:00
parent 8d89a9020f
commit a06052dd83
No known key found for this signature in database
GPG Key ID: 90489CDA50BCDE34
3 changed files with 37 additions and 37 deletions

View File

@ -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",
},
@ -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",
},

View File

@ -753,7 +753,7 @@ func samplePayload() io.Reader {
Relationships: map[string]interface{}{
"posts": &RelationshipManyNode{
Data: []*Node{
&Node{
{
Type: "posts",
Attributes: map[string]interface{}{
"title": "Foo",
@ -761,7 +761,7 @@ func samplePayload() io.Reader {
},
ClientID: "1",
},
&Node{
{
Type: "posts",
Attributes: map[string]interface{}{
"title": "X",
@ -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!",
@ -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",
},
@ -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",
},
@ -910,11 +910,11 @@ func testModel() *Blog {
Title: "Foo",
Body: "Bar",
Comments: []*Comment{
&Comment{
{
ID: 1,
Body: "foo",
},
&Comment{
{
ID: 2,
Body: "bar",
},

View File

@ -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
@ -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",
},
@ -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",
@ -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",
@ -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 {
@ -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",
},
@ -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",
},
@ -867,11 +867,11 @@ func testBlog() *Blog {
Title: "Foo",
Body: "Bar",
Comments: []*Comment{
&Comment{
{
ID: 1,
Body: "foo",
},
&Comment{
{
ID: 2,
Body: "bar",
},