mirror of
https://github.com/lucheng0127/virtuallan.git
synced 2025-09-26 12:41:10 +08:00
29 lines
447 B
Go
29 lines
447 B
Go
package main
|
|
|
|
import (
|
|
"os"
|
|
|
|
vcli "github.com/lucheng0127/virtuallan/pkg/cli"
|
|
log "github.com/sirupsen/logrus"
|
|
"github.com/urfave/cli/v2"
|
|
)
|
|
|
|
func main() {
|
|
app := &cli.App{
|
|
Commands: []*cli.Command{
|
|
vcli.NewClientCmd(),
|
|
vcli.NewUserCmd(),
|
|
},
|
|
}
|
|
|
|
serverCmd := vcli.NewServerCmd()
|
|
if serverCmd != nil {
|
|
app.Commands = append(app.Commands, serverCmd)
|
|
}
|
|
|
|
if err := app.Run(os.Args); err != nil {
|
|
log.Error(err)
|
|
os.Exit(1)
|
|
}
|
|
}
|