(path string)
| 81 | } |
| 82 | |
| 83 | func validateAPIPath(path string) error { |
| 84 | trimmed := strings.TrimLeft(path, "/") |
| 85 | if !strings.HasPrefix(trimmed, "api") { |
| 86 | return fmt.Errorf("the api command only supports paths prefixed with /api (e.g. /api/spaces)") |
| 87 | } |
| 88 | return nil |
| 89 | } |