Commit 1f9a4750 authored by Daniel Smith's avatar Daniel Smith

Fix dangerous Sprintf

parent 414ae795
...@@ -35,6 +35,7 @@ package config ...@@ -35,6 +35,7 @@ package config
import ( import (
"fmt" "fmt"
"path"
"strings" "strings"
"time" "time"
...@@ -160,7 +161,7 @@ func (s ConfigSourceEtcd) GetServices() ([]api.Service, []api.Endpoints, error) ...@@ -160,7 +161,7 @@ func (s ConfigSourceEtcd) GetServices() ([]api.Service, []api.Endpoints, error)
// GetEndpoints finds the list of endpoints of the service from etcd. // GetEndpoints finds the list of endpoints of the service from etcd.
func (s ConfigSourceEtcd) GetEndpoints(service string) (api.Endpoints, error) { func (s ConfigSourceEtcd) GetEndpoints(service string) (api.Endpoints, error) {
key := fmt.Sprintf(registryRoot + "/endpoints/" + service) key := path.Join(registryRoot, "endpoints", service)
response, err := s.client.Get(key, true, false) response, err := s.client.Get(key, true, false)
if err != nil { if err != nil {
glog.Errorf("Failed to get the key: %s %v", key, err) glog.Errorf("Failed to get the key: %s %v", key, err)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment