+ errPrefix := fmt.Sprintf("%s: host %q:", path, x.Name)
+ if x.Name == GroupAll {
+ return nil, fmt.Errorf(
+ "%s conflict with pre-defined group %q",
+ errPrefix, x.Name)
+ }
+ if strings.HasPrefix(x.Name, GroupDetectedPrefix) {
+ return nil, fmt.Errorf(
+ "%s name must not start with %q "+
+ "(reserved for detected groups)",
+ errPrefix, GroupDetectedPrefix)
+ }
+ if strings.Contains(x.Name, GroupSpecialSeparator) {
+ return nil, fmt.Errorf(
+ "%s name must not contain %q",
+ errPrefix, GroupSpecialSeparator)
+ }
+