code: func (c *SDConfig) UnmarshalYAML(unmarshal func(interface{}) error) error {
  	*c = DefaultSDConfig
  	type plain SDConfig
  	err := unmarshal((*plain)(c))
  	if err != nil {
  		return err
  	}
  	if len(c.Files) == 0 {
  		return errors.New("file service discovery config must contain at least one path name")
  	}
  	for _, name := range c.Files {
  		if !patFileSDName.MatchString(name) {
  			return errors.Errorf("path name %q is not valid for file discovery", name)
  		}
  	}
  	return nil
  }
docs: // UnmarshalYAML implements the yaml.Unmarshaler interface.