Use string concatenation to compose simple expression

Co-authored-by: Héctor Hurtado <hector.hurtado@bbva.com>
This commit is contained in:
pancho horrillo
2019-10-04 07:28:08 +02:00
parent 57d1aabb66
commit a865ade26a
+1 -4
View File
@@ -1,7 +1,6 @@
package client package client
import ( import (
"fmt"
"io" "io"
"github.com/BBVA/kapow/internal/http" "github.com/BBVA/kapow/internal/http"
@@ -9,7 +8,5 @@ import (
// TODO: Review spec: Data API > Error responses > 204 Resource Item Not Found should not be 2xx // TODO: Review spec: Data API > Error responses > 204 Resource Item Not Found should not be 2xx
func SetData(kapowURL, handlerId, path string, r io.Reader) error { func SetData(kapowURL, handlerId, path string, r io.Reader) error {
return http.Put(kapowURL+"/"+handlerId+path, "", r, nil)
return http.Put(fmt.Sprintf("%s/%s%s", kapowURL, handlerId, path), "", r, nil)
} }