diff --git a/consul/discovery.go b/consul/discovery.go index c043579..2f60d24 100644 --- a/consul/discovery.go +++ b/consul/discovery.go @@ -23,16 +23,16 @@ type Service struct { var ErrServiceUnavailable = fmt.Errorf("Service is unavailable") -func NewService(serverAddr, appID, appName, ip, domain string, appPort int) (*Service, error) { +func NewService(servAddr, id, appName, ip, domain string, appPort int) (*Service, error) { s := new(Service) - s.AppID = appID + s.AppID = id s.Name = strings.Replace(appName, "-", "", -1) s.Address = domain s.IP = ip s.Port = appPort s.TTL = time.Second * 15 - client, err := consul.NewClient(newClientConfig(serverAddr)) + client, err := consul.NewClient(newClientConfig(servAddr)) if err != nil { return nil, err }