schnutibox/cmd/timer.go

22 lines
410 B
Go
Raw Normal View History

2021-08-05 09:43:35 +02:00
package cmd
import (
"os"
"github.com/rs/zerolog"
"github.com/rs/zerolog/log"
2021-08-05 09:43:35 +02:00
"github.com/spf13/cobra"
"go.xsfx.dev/schnutibox/pkg/timer"
)
// nolint:gochecknoglobals
var timerCmd = &cobra.Command{
Use: "timer",
Short: "Handling timer",
Run: timer.Run,
PreRun: func(cmd *cobra.Command, args []string) {
log.Logger = log.Output(zerolog.ConsoleWriter{Out: os.Stderr})
initConfig(false)
},
2021-08-05 09:43:35 +02:00
}