gum/main.go
Maas Lalani 7190822247
refactor(kong): Implement Run(...) error interface
Instead of needing to run the commands manually in main.go, we can implement the `Run(...) error` method to satisfy the command interface so that `kong` can Run our commands for us.
2022-07-12 22:33:52 -04:00

25 lines
481 B
Go

package main
import (
"github.com/alecthomas/kong"
"github.com/charmbracelet/lipgloss"
"github.com/muesli/termenv"
)
func main() {
lipgloss.SetColorProfile(termenv.ANSI256)
gum := &Gum{}
ctx := kong.Parse(
gum,
kong.Name("gum"),
kong.Description("Tasty Bubble Gum for your shell."),
kong.UsageOnError(),
kong.ConfigureHelp(kong.HelpOptions{
Compact: true,
Summary: false,
}),
kong.Vars{"defaultBackground": "", "defaultForeground": ""},
)
ctx.Run()
}