abiosoft / abiosoft/ishell

How to find the parent of subcommand?

Offen
#111 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Go
Sterne
1.8k
Forks
213
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

In case of subcommands, how to find the parent command, using the ishell context of the sub command?

For example:
Say mycmd and newcmd has 2 subcommands:

```
mycmd help
add del

newcmd help
add del
```

The handler for add receives the ishell.Context. How to figure if the parent of add is mycmd or newcmd?

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.