You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mErr.Errors=append(mErr.Errors, fmt.Errorf("service name must be valid per RFC 1123 and can contain only alphanumeric characters or dashes and must be less than 63 characters long: %q", s.Name))
1919
+
mErr.Errors=append(mErr.Errors, fmt.Errorf("service name must be valid per RFC 1123 and can contain only alphanumeric characters or dashes: %q", s.Name))
1919
1920
}
1920
1921
1921
1922
for_, c:=ranges.Checks {
@@ -1931,6 +1932,20 @@ func (s *Service) Validate() error {
1931
1932
returnmErr.ErrorOrNil()
1932
1933
}
1933
1934
1935
+
// ValidateName checks if the services Name is valid and should be called after
1936
+
// the name has been interpolated
1937
+
func (s*Service) ValidateName(namestring) error {
1938
+
// Ensure the service name is valid per RFC-952 §1
returnfmt.Errorf("service name must be valid per RFC 1123 and can contain only alphanumeric characters or dashes and must be less than 63 characters long: %q", name)
1945
+
}
1946
+
returnnil
1947
+
}
1948
+
1934
1949
// Hash calculates the hash of the check based on it's content and the service
0 commit comments