gxthrj commented on a change in pull request #715:
URL:
https://github.com/apache/apisix-ingress-controller/pull/715#discussion_r737950878
##########
File path: pkg/config/config.go
##########
@@ -228,10 +226,7 @@ func (cfg *Config) verifyNamespaceSelector() (bool, error)
{
// ref:
https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#syntax-and-character-set
func (cfg *Config) validateLabelKey(key string) error {
errorMsg := validation.IsQualifiedName(key)
- msg := ""
- for _, err := range errorMsg {
- msg = msg + err + " . "
- }
+ msg := strings.Join(errorMsg, ".")
Review comment:
Using `.` is because I checked the errors from validation, there is no
`.` such as
https://github.com/kubernetes/apimachinery/blob/master/pkg/util/validation/validation.go#L157
But I also think linebreak is better.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]