mozhi/cmd/root.go

25 lines
492 B
Go
Raw Normal View History

2023-06-25 00:10:57 +05:30
package cmd
import (
"log"
"os"
"github.com/spf13/cobra"
)
var rootCmd = &cobra.Command{
Use: "simplytranslate",
Short: "An alternative front-end for many Translation Engines.",
Long: "An alternative front-end for many Translation Engines, rewritten in Gofiber+colly by AryaK.",
Run: func(cmd *cobra.Command, args []string) {
cmd.Help()
},
}
func Execute() {
if err := rootCmd.Execute(); err != nil {
log.Println(os.Stderr, "Error running CLI: %v", err)
os.Exit(1)
}
}