spf13 / cobra

A Commander for modern Go CLI interactions
https://cobra.dev
Apache License 2.0
38.41k stars 2.86k forks source link

How does record executed commands and parameters #2176

Open guocaifeng opened 3 months ago

guocaifeng commented 3 months ago

for example:

input: main-cobra import -i aaa -c ddd

output import -i aaa -c ddd

marckhouzam commented 3 months ago

Maybe fmt.Println(os.Args[1:])