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))
1864
+
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))
1864
1865
}
1865
1866
1866
1867
for_, c:=ranges.Checks {
@@ -1876,6 +1877,20 @@ func (s *Service) Validate() error {
1876
1877
returnmErr.ErrorOrNil()
1877
1878
}
1878
1879
1880
+
// ValidateName checks if the services Name is valid and should be called after
1881
+
// the name has been interpolated
1882
+
func (s*Service) ValidateName(namestring) error {
1883
+
// 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)
1890
+
}
1891
+
returnnil
1892
+
}
1893
+
1879
1894
// Hash calculates the hash of the check based on it's content and the service
0 commit comments