mirror of
https://github.com/mark3labs/kit.git
synced 2026-06-14 03:30:26 +00:00
@@ -2,6 +2,7 @@ package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/charmbracelet/fang"
|
||||
@@ -11,6 +12,13 @@ import (
|
||||
var version = "dev"
|
||||
|
||||
func main() {
|
||||
for _, arg := range os.Args[1:] {
|
||||
if arg == "--version" || arg == "-v" {
|
||||
fmt.Printf("mcphost version %s\n", version)
|
||||
os.Exit(0)
|
||||
}
|
||||
}
|
||||
|
||||
rootCmd := cmd.GetRootCommand(version)
|
||||
if err := fang.Execute(context.Background(), rootCmd); err != nil {
|
||||
os.Exit(1)
|
||||
|
||||
Reference in New Issue
Block a user