func apiPath(modelTag names.ModelTag, path string) (string, error) {
	if !strings.HasPrefix(path, "/") {
		return "", errors.Errorf("cannot make API path from non-slash-prefixed path %q", path)
	}
	modelUUID := modelTag.Id()
	if modelUUID == "" {
		return path, nil
	}
	return modelRoot + modelUUID + path, nil
}
// apiPath returns the given API endpoint path relative
// to the given model tag.
apiPath returns the given API endpoint path relative
to the given model tag.
// apiPath returns the given API endpoint path relative // to the given model tag .
func apiPath(modelTag names.ModelTag, path string) (string, error) {
	if !strings.HasPrefix(path, "/") {
		return "", errors.Errorf("cannot make API path from non-slash-prefixed path %q", path)
	}
	modelUUID := modelTag.Id()
	if modelUUID == "" {
		return path, nil
	}
	return modelRoot + modelUUID + path, nil
}
func apiPath ( modelTag names . ModelTag , path string ) ( string , error ) { if ! strings . HasPrefix ( path , " " ) { return " " , errors . Errorf ( " " , path ) } modelUUID := modelTag . Id ( ) if modelUUID == " " { return path , nil } return modelRoot + modelUUID + path , nil }
apiPath returns the given API endpoint path relative
to the given model tag.
apiPath returns the given API endpoint path relative to the given model tag .