Replies: 2 comments 2 replies
-
Absolutely: package main
import (
"fmt"
"github.com/alecthomas/kong"
)
var cli struct {
Verbose bool `help:"print some extra stuff"`
}
func main() {
kong.Parse()
if cli.Verbose {
fmt.Println("blah")
}
fmt.Println("Hello, playground")
} |
Beta Was this translation helpful? Give feedback.
0 replies
-
Okay great! Now for a slightly more complicated example:
When I try this, I get
I was hoping that CLI would act as the root command. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Is it possible to write a simple CLI with no subcommand in kong. For example, how would you write the equivalent of
Beta Was this translation helpful? Give feedback.
All reactions