1
0
Fork 0
mirror of https://github.com/eosswedenorg/thalos synced 2026-06-19 04:50:02 +02:00

cmd/tools: change from github.com/spf13/cobra to github.com/urfave/cli/v2 as cli library.

This commit is contained in:
Henrik Hautakoski 2023-06-28 15:19:19 +02:00
parent 3379c70e63
commit c7246ead03
5 changed files with 120 additions and 104 deletions

View file

@ -3,7 +3,7 @@ package main
import (
"os"
"github.com/spf13/cobra"
"github.com/urfave/cli/v2"
_ "github.com/eosswedenorg/thalos/app/log"
log "github.com/sirupsen/logrus"
@ -11,14 +11,17 @@ import (
var VersionString string = "dev"
var rootCmd = &cobra.Command{
Use: os.Args[0],
Short: "Collection of tools for dealing with the thalos application",
Version: VersionString,
}
func main() {
if err := rootCmd.Execute(); err != nil {
app := &cli.App{
Usage: "Collection of tools for dealing with the thalos application",
Version: VersionString,
Commands: []*cli.Command{
validateCmd,
benchCmd,
},
}
if err := app.Run(os.Args); err != nil {
log.WithError(err).Fatal("Application error")
}
}