code: func ValidatePathSegmentName(name string, prefix bool) (bool, string) {
  	if prefix {
  		return IsValidPathSegmentPrefix(name)
  	} else {
  		return IsValidPathSegmentName(name)
  	}
  }
docs: // ValidatePathSegmentName validates the name can be safely encoded as a path segment