mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 12:43:23 +00:00
[Provider/Azure] remove extra Sprintf
This commit is contained in:
parent
356c121c6d
commit
353140a67a
@ -131,7 +131,7 @@ func TestInstanceID(t *testing.T) {
|
|||||||
|
|
||||||
mux := http.NewServeMux()
|
mux := http.NewServeMux()
|
||||||
mux.Handle("/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
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() {
|
go func() {
|
||||||
http.Serve(listener, mux)
|
http.Serve(listener, mux)
|
||||||
@ -350,7 +350,7 @@ func TestNodeAddresses(t *testing.T) {
|
|||||||
|
|
||||||
mux := http.NewServeMux()
|
mux := http.NewServeMux()
|
||||||
mux.Handle("/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
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() {
|
go func() {
|
||||||
http.Serve(listener, mux)
|
http.Serve(listener, mux)
|
||||||
|
Loading…
Reference in New Issue
Block a user