Skip to content

Commit

Permalink
[Provider/Azure] remove extra Sprintf
Browse files Browse the repository at this point in the history
  • Loading branch information
gaurav1086 committed May 28, 2020
1 parent 356c121 commit 353140a
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -131,7 +131,7 @@ func TestInstanceID(t *testing.T) {

mux := http.NewServeMux()
mux.Handle("/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
fmt.Fprint(w, fmt.Sprintf(`{"compute":{"name":"%s","subscriptionId":"subscription","resourceGroupName":"rg"}}`, test.metadataName))
fmt.Fprintf(w, "{\"compute\":{\"name\":\"%s\",\"subscriptionId\":\"subscription\",\"resourceGroupName\":\"rg\"}}", test.metadataName)
}))
go func() {
http.Serve(listener, mux)
Expand Down Expand Up @@ -350,7 +350,7 @@ func TestNodeAddresses(t *testing.T) {

mux := http.NewServeMux()
mux.Handle("/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
fmt.Fprint(w, fmt.Sprintf(metadataTemplate, test.nodeName, test.ipV4, test.ipV4Public, test.ipV6, test.ipV6Public))
fmt.Fprint(w, metadataTemplate, test.nodeName, test.ipV4, test.ipV4Public, test.ipV6, test.ipV6Public)
}))
go func() {
http.Serve(listener, mux)
Expand Down

0 comments on commit 353140a

Please sign in to comment.