mirror of
https://github.com/logos-messaging/storenode-messages-counter.git
synced 2026-01-02 14:13:11 +00:00
33 lines
609 B
Go
33 lines
609 B
Go
package main
|
|
|
|
import (
|
|
"os"
|
|
|
|
"github.com/urfave/cli/v2"
|
|
"github.com/urfave/cli/v2/altsrc"
|
|
)
|
|
|
|
var options Options
|
|
|
|
func main() {
|
|
// Defaults
|
|
options.LogLevel = "DEBUG"
|
|
options.LogEncoding = "console"
|
|
|
|
app := &cli.App{
|
|
Name: "storenode-messages",
|
|
Description: "storenode message counter",
|
|
Version: "0.0.1",
|
|
Before: altsrc.InitInputSourceWithContext(cliFlags, altsrc.NewTomlSourceFromFlagFunc("config-file")),
|
|
Flags: cliFlags,
|
|
Action: func(c *cli.Context) error {
|
|
return Execute(c.Context, options)
|
|
},
|
|
}
|
|
|
|
err := app.Run(os.Args)
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
}
|