Browse Source

Initialise struct literals with boolean pointers, using anonymous functions

pull/158/head
Richard Lewis 8 years ago
parent
commit
74751cb219
  1. 9
      src/github.com/matrix-org/go-neb/services/imgur/imgur_test.go

9
src/github.com/matrix-org/go-neb/services/imgur/imgur_test.go

@ -47,9 +47,10 @@ func TestCommand(t *testing.T) {
}
img := imgurGalleryImage{
Title: "A Cat",
Link: imgurImageURL,
Type: "image/jpeg",
Title: "A Cat",
Link: imgurImageURL,
Type: "image/jpeg",
IsAlbum: func() *bool { b := false; return &b }(),
}
imgJSON, err := json.Marshal(img)
@ -62,7 +63,7 @@ func TestCommand(t *testing.T) {
Data: []json.RawMessage{
rawImageJSON,
},
Success: true,
Success: func() *bool { b := true; return &b }(),
Status: 200,
}

Loading…
Cancel
Save