Fix linter errors, modernize command
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
d5e3cdf7c3
commit
cec63d6436
1 changed files with 6 additions and 5 deletions
|
@ -1,3 +1,4 @@
|
|||
//nolint:gomnd // Lots of index counts in here, makes not sense
|
||||
package main
|
||||
|
||||
import (
|
||||
|
@ -41,11 +42,6 @@ func initApp() error {
|
|||
return errors.Wrap(err, "parsing cli options")
|
||||
}
|
||||
|
||||
if cfg.VersionAndExit {
|
||||
fmt.Printf("automod-debug %s\n", version)
|
||||
os.Exit(0)
|
||||
}
|
||||
|
||||
l, err := logrus.ParseLevel(cfg.LogLevel)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "parsing log-level")
|
||||
|
@ -61,6 +57,11 @@ func main() {
|
|||
logrus.WithError(err).Fatal("initializing app")
|
||||
}
|
||||
|
||||
if cfg.VersionAndExit {
|
||||
logrus.WithField("version", version).Info("twitch-bot-tools/automod-debug")
|
||||
os.Exit(0)
|
||||
}
|
||||
|
||||
var input struct {
|
||||
Message string `json:"message"`
|
||||
Tags struct {
|
||||
|
|
Loading…
Reference in a new issue