discordo/main.go
2023-10-20 14:52:15 +05:30

26 lines
402 B
Go

package main
import (
"log"
"github.com/alecthomas/kong"
"github.com/ayn2op/discordo/cmd/run"
"github.com/ayn2op/discordo/config"
"github.com/zalando/go-keyring"
)
var cli struct {
Run run.Cmd `cmd:"" default:"withargs"`
}
func main() {
t, _ := keyring.Get(config.Name, "token")
ctx := kong.Parse(&cli, kong.Vars{
"token": t,
})
err := ctx.Run()
if err != nil {
log.Fatal(err)
}
}