register fix

This commit is contained in:
Piotr Biernat 2022-12-01 20:26:22 +01:00
parent ba6bd4137c
commit 5bf58aad16

View File

@ -120,7 +120,8 @@ func (s *Service) check() (bool, error) {
func (s *Service) getMetadata() map[string]string {
m := map[string]string{}
m["traefik/http/services/"+s.Name+"/loadBalancer/servers/0/url"] = s.GetFullAddr()
key := fmt.Sprintf("traefik/http/services/%s/loadBalancer/servers/0/url", s.Name)
m[key] = s.GetFullAddr()
fmt.Printf("netadata: %v", m)