client: Use string concatenation instead of Sprintf

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
This commit is contained in:
Aaron Lehmann
2017-06-02 14:00:56 +02:00
parent 096eeb3e75
commit 44c9ccc069
4 changed files with 7 additions and 10 deletions

View File

@@ -1,8 +1,6 @@
package client
import (
"fmt"
"github.com/docker/docker/api/types"
"golang.org/x/net/context"
)
@@ -10,7 +8,7 @@ import (
// Ping pings the server and returns the value of the "Docker-Experimental", "OS-Type" & "API-Version" headers
func (cli *Client) Ping(ctx context.Context) (types.Ping, error) {
var ping types.Ping
req, err := cli.buildRequest("GET", fmt.Sprintf("%s/_ping", cli.basePath), nil, nil)
req, err := cli.buildRequest("GET", cli.basePath+"/_ping", nil, nil)
if err != nil {
return ping, err
}