code: func trimV1Address(address string) (string, error) {
  	var (
  		chunks        []string
  		apiVersionStr string
  	)
  
  	if strings.HasSuffix(address, "/") {
  		address = address[:len(address)-1]
  	}
  
  	chunks = strings.Split(address, "/")
  	apiVersionStr = chunks[len(chunks)-1]
  	if apiVersionStr == "v1" {
  		return strings.Join(chunks[:len(chunks)-1], "/"), nil
  	}
  
  	for k, v := range apiVersions {
  		if k != APIVersion1 && apiVersionStr == v {
  			return "", fmt.Errorf("unsupported V1 version path %s", apiVersionStr)
  		}
  	}
  
  	return address, nil
  }
docs: // trimV1Address trims the version off the address and returns the
  // trimmed address or an error if there is a non-V1 version.