INNER CODE UNIT · Go
parseCommand
Bharath-code/git-scope · cmd/git-scope/main.go:119
func parseCommand(args []string) (cmd string, dirs []string) {
if len(args) == 0 {
return "", nil
}
switch args[0] {
case "scan", "status", "mcp", "tui", "help", "init", "scan-all", "issue":
return args[0], args[1:]
default:
return "tui", args // assume it's a directory
}
}
// run executes the requested command using the provided configuration path
// and directories.
func run(cmd string, dirs []string, configPath string) error {
switch cmd {
case "init":