1234567891011121314151617181920212223242526272829303132333435 |
- package daemon
- import (
- "fmt"
- "git.beejay.kim/tool/service/config"
- "github.com/urfave/cli/v2"
- )
- var (
- CMD = cli.Command{
- Name: "daemon",
- Usage: "run daemon",
- Action: func(ctx *cli.Context) error {
- var (
- cfg = config.Get[Configuration](ctx)
- )
- if cfg == nil {
- return fmt.Errorf("could not load Configuration")
- }
- return fmt.Errorf("implement me")
- },
- Flags: []cli.Flag{
- &cli.PathFlag{
- Name: "config",
- Usage: "config file path",
- Required: true,
- Aliases: []string{"C"},
- TakesFile: false,
- Action: config.Load[Configuration],
- },
- },
- }
- )
|