code: func validatePathishString(p, title string) error {
  	if !packageNameRe.MatchString(p) {
  		return fmt.Errorf("invalid %s: %q", title, p)
  	}
  	for _, chunk := range strings.Split(p, "/") {
  		if strings.Count(chunk, ".") == len(chunk) {
  			return fmt.Errorf("invalid %s (dots-only names are forbidden): %q", title, p)
  		}
  	}
  	return nil
  }
docs: // validatePathishString is common implementation of ValidatePackageName and
  // ValidatePackagePrefix.