2024-05-24 11:44:03 +02:00
|
|
|
package main
|
|
|
|
|
|
|
|
|
|
import (
|
2024-05-24 19:41:44 +02:00
|
|
|
"github.com/DariusKlein/kleinCommand/commands/boom"
|
|
|
|
|
"github.com/DariusKlein/kleinCommand/commands/bubbleTeaTest"
|
|
|
|
|
"github.com/DariusKlein/kleinCommand/commands/config"
|
2024-05-24 23:10:45 +02:00
|
|
|
"github.com/DariusKlein/kleinCommand/commands/games"
|
2024-05-24 19:41:44 +02:00
|
|
|
"github.com/DariusKlein/kleinCommand/commands/template"
|
|
|
|
|
"github.com/DariusKlein/kleinCommand/commands/welcome"
|
2024-05-24 20:32:42 +02:00
|
|
|
"github.com/DariusKlein/kleinCommand/services"
|
2024-05-24 11:44:03 +02:00
|
|
|
"github.com/urfave/cli/v2"
|
|
|
|
|
"log"
|
|
|
|
|
"os"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
func main() {
|
2024-05-24 21:02:44 +02:00
|
|
|
Config, _ := services.ReadConfig()
|
2024-05-24 20:32:42 +02:00
|
|
|
|
2024-05-24 11:44:03 +02:00
|
|
|
app := &cli.App{
|
2024-05-24 19:41:44 +02:00
|
|
|
Name: "KleinCommand",
|
|
|
|
|
Usage: "manage your home server",
|
|
|
|
|
UsageText: "kleinCommand [category] [command] [arguments...]",
|
|
|
|
|
Version: "v0.0.1",
|
|
|
|
|
HideVersion: true,
|
2024-05-24 12:21:21 +02:00
|
|
|
Authors: []*cli.Author{
|
|
|
|
|
{
|
|
|
|
|
Name: "Darius",
|
|
|
|
|
Email: "darius.klein@dariusklein.nl",
|
|
|
|
|
},
|
|
|
|
|
},
|
2024-05-24 11:44:03 +02:00
|
|
|
DefaultCommand: "help",
|
|
|
|
|
Commands: []*cli.Command{
|
2024-05-24 20:32:42 +02:00
|
|
|
template.Command(Config),
|
|
|
|
|
welcome.Command(Config),
|
|
|
|
|
boom.Command(Config),
|
|
|
|
|
bubbleTeaTest.Command(Config),
|
|
|
|
|
config.Command(Config),
|
2024-05-24 23:10:45 +02:00
|
|
|
games.Command(Config),
|
2024-05-24 11:44:03 +02:00
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if err := app.Run(os.Args); err != nil {
|
|
|
|
|
log.Fatal(err)
|
|
|
|
|
}
|
|
|
|
|
}
|