Files
virtuallan/main.go
2024-07-12 11:35:45 +08:00

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)
}
}