@@ -539,7 +539,7 @@ func CreateService(service *v1.Service) (CreateServicesResponse, error) {
539
539
}
540
540
if response .Code != ExistedResource {
541
541
log .SyncNamingScope ().Errorf ("Failed to create service %s %v" , serviceMsg , response .Info )
542
- return response , fmt .Errorf ("create namespace failed: " + response .Info )
542
+ return response , fmt .Errorf ("create namespace failed: %s" , response .Info )
543
543
}
544
544
}
545
545
@@ -603,7 +603,7 @@ func CreateServiceAlias(service *v1.Service) (CreateServiceAliasResponse, error)
603
603
}
604
604
if response .Code != ExistedResource {
605
605
log .SyncNamingScope ().Errorf ("Failed to create service alias %s %v" , serviceAliasMsg , response .Info )
606
- return response , fmt .Errorf ("create service alias failed: " + response .Info )
606
+ return response , fmt .Errorf ("create service alias failed: %s" , response .Info )
607
607
}
608
608
}
609
609
@@ -648,7 +648,7 @@ func UpdateService(service *v1.Service, request []Service) (int, PutServicesResp
648
648
return statusCode , PutServicesResponse {}, err
649
649
}
650
650
log .SyncNamingScope ().Errorf ("Failed to update result %s %v" , serviceMsg , response .Info )
651
- return statusCode , response , fmt .Errorf ("Put service failed: " + response .Info )
651
+ return statusCode , response , fmt .Errorf ("Put service failed: %s " , response .Info )
652
652
}
653
653
654
654
return statusCode , response , nil
@@ -697,7 +697,7 @@ func CreateNamespaces(namespace string) (CreateNamespacesResponse, error) {
697
697
if response .Responses == nil || len (response .Responses ) == 0 ||
698
698
response .Responses [0 ].Code != ExistedResource {
699
699
log .SyncNamingScope ().Errorf ("Failed to create namespace %s ,error response: %v" , namespace , response )
700
- return response , fmt .Errorf ("create namespace failed: " + response .Info )
700
+ return response , fmt .Errorf ("create namespace failed: %s" , response .Info )
701
701
}
702
702
}
703
703
0 commit comments