Skip to content
Permalink
Browse files
use path.Join instead of Sprintf
  • Loading branch information
geomacy committed Sep 4, 2019
1 parent 3101f40 commit 53b6c1b0cd82ba93dd648f563b01e02a44b54a6e
Showing 1 changed file with 3 additions and 1 deletion.
@@ -21,6 +21,8 @@ package locations
import (
"encoding/json"
"fmt"
"path"

"github.com/apache/brooklyn-client/cli/models"
"github.com/apache/brooklyn-client/cli/net"
)
@@ -56,7 +58,7 @@ func DeleteLocation(network *net.Network, locationId string) (string, error) {

// WIP
func CreateLocation(network *net.Network, locationId string) (string, error) {
url := fmt.Sprintf("/v1/locations/%s", locationId)
url := path.Join("/v1/locations", locationId)
body, err := network.SendEmptyPostRequest(url)
if err != nil {
return "", err

0 comments on commit 53b6c1b

Please sign in to comment.