Browse Source

Cleaned up string formatting

pull/159/head
Richard Lewis 7 years ago
parent
commit
fb52354461
  1. 4
      src/github.com/matrix-org/go-neb/services/wikipedia/wikipedia_test.go

4
src/github.com/matrix-org/go-neb/services/wikipedia/wikipedia_test.go

@ -76,9 +76,7 @@ func TestCommand(t *testing.T) {
httpClient = &http.Client{Transport: wikipediaTrans}
// Create the Wikipedia service
srv, err := types.CreateService("id", ServiceType, "@wikipediabot:hyrule", []byte(
`{"api_key":"`+apiKey+`"}`,
))
srv, err := types.CreateService("id", ServiceType, "@wikipediabot:hyrule", []byte(fmt.Sprintf(`{"api_key":"%s"}`, apiKey)))
if err != nil {
t.Fatal("Failed to create Wikipedia service: ", err)
}

Loading…
Cancel
Save