feat: refact syncrepo using go

This commit is contained in:
engigu
2026-02-27 11:35:55 +08:00
parent 54409696c4
commit 578e020f0d
10 changed files with 370 additions and 342 deletions
+23 -2
View File
@@ -1,7 +1,28 @@
package main
import "github.com/engigu/baihu-panel/internal/bootstrap"
import (
"fmt"
"os"
"github.com/engigu/baihu-panel/cmd/reposync"
"github.com/engigu/baihu-panel/internal/bootstrap"
)
func main() {
bootstrap.New().Run()
if len(os.Args) < 2 {
bootstrap.New().Run()
return
}
cmd := os.Args[1]
switch cmd {
case "server":
bootstrap.New().Run()
case "reposync":
reposync.Run(os.Args[2:])
default:
fmt.Printf("Unknown command: %s\n", cmd)
fmt.Println("Available commands: server, reposync")
os.Exit(1)
}
}