Parse a combined `workspace/project` slug into its two components. # Errors Returns [`CliError::InvalidArgument`] if the input does not contain exactly one `/` separator.
(path: &str)
| 51 | /// Returns [`CliError::InvalidArgument`] if the input does not contain |
| 52 | /// exactly one `/` separator. |
| 53 | pub fn parse_project_path(path: &str) -> CliResult<(&str, &str)> { |
| 54 | path.split_once('/') |
| 55 | .ok_or_else(|| CliError::InvalidArgument { |
| 56 | message: format!("Expected format 'workspace/project', got '{}'", path), |
| 57 | }) |
| 58 | } |
| 59 | |
| 60 | // --------------------------------------------------------------------------- |
| 61 | // Subcommand dispatch |
no outgoing calls