code: func ValidateSubdir(subdir string) error {
  	if subdir == "" { // empty is fine
  		return nil
  	}
  	if strings.Contains(subdir, "\\") {
  		return fmt.Errorf(`bad subdir: backslashes not allowed (use "/"): %q`, subdir)
  	}
  	if strings.Contains(subdir, ":") {
  		return fmt.Errorf(`bad subdir: colons are not allowed: %q`, subdir)
  	}
  	if cleaned := path.Clean(subdir); cleaned != subdir {
  		return fmt.Errorf("bad subdir: %q (should be %q)", subdir, cleaned)
  	}
  	if strings.HasPrefix(subdir, "./") || strings.HasPrefix(subdir, "../") || subdir == "." {
  		return fmt.Errorf(`bad subdir: invalid ".": %q`, subdir)
  	}
  	if strings.HasPrefix(subdir, "/") {
  		return fmt.Errorf("bad subdir: absolute paths not allowed: %q", subdir)
  	}
  	return nil
  }
docs: // ValidateSubdir returns an error if the string can't be used as an ensure-file
  // subdir.