From fb523544613f9463b14ce03a9a68e49d766a49dd Mon Sep 17 00:00:00 2001 From: Richard Lewis Date: Tue, 21 Feb 2017 21:35:44 +0000 Subject: [PATCH] Cleaned up string formatting --- .../matrix-org/go-neb/services/wikipedia/wikipedia_test.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/github.com/matrix-org/go-neb/services/wikipedia/wikipedia_test.go b/src/github.com/matrix-org/go-neb/services/wikipedia/wikipedia_test.go index 6440cb9..924ba99 100644 --- a/src/github.com/matrix-org/go-neb/services/wikipedia/wikipedia_test.go +++ b/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) }