Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
commander
✓ github.com/shomali11/commander
Define a simple CLI command with a flag.
package main
import (
"fmt"
"github.com/shomali11/commander"
)
func main() {
cmd := commander.NewCommand("greet")
cmd.Flag("name", "World")
cmd.Action(func(args []string, flags map[string]string) {
fmt.Printf("Hello, %s!\n", flags["name"])
})
cmd.Execute()
}
Debug
Known issues
No known issues recorded.
Upgrade
Version history
0.0.0-20230730023802-0b64f620037dlatest on pkg.go.dev
Audit
Dependencies
No dependency data recorded yet.