Initial commit

This commit is contained in:
Yuzuki616
2024-09-12 06:04:32 +09:00
commit 3f58fa7f0d
31 changed files with 2814 additions and 0 deletions

32
cmd/ratte/ratte.go Normal file
View File

@@ -0,0 +1,32 @@
package main
import (
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
pre "github.com/x-cray/logrus-prefixed-formatter"
)
var version string
var buildDate string
var command = &cobra.Command{
Use: "Ratte",
}
func Execute() {
err := command.Execute()
if err != nil {
log.WithField("err", err).Error("Execute command failed")
}
}
func main() {
log.SetFormatter(&pre.TextFormatter{
TimestampFormat: "01-02 15:04:05",
FullTimestamp: true,
})
log.Info("Ratte")
log.Info("Version: ", version)
log.Info("Build date: ", buildDate)
Execute()
}