/* Copyright (C) 2022 - now HaoZi Technology Co., Ltd. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package main import ( "fmt" "log" "os" "github.com/urfave/cli/v2" ) func main() { app := &cli.App{ Name: "panel", HelpName: "耗子面板", Usage: "命令行工具", UsageText: "panel [global options] command [command options] [arguments...]", HideVersion: true, Commands: []*cli.Command{ { Name: "test", Aliases: []string{"t"}, Usage: "print a test message", Action: func(c *cli.Context) error { fmt.Println("Hello, World!") return nil }, }, }, } if err := app.Run(os.Args); err != nil { log.Fatal(err) } }