From b0a85022a3440789251ffbef0ddaf0dfe53b2ce3 Mon Sep 17 00:00:00 2001 From: misitebao Date: Wed, 10 Feb 2021 08:07:15 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E6=96=B0=E5=A2=9E=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E5=91=BD=E4=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmd/mebius/main.go | 32 ++++++++++++++++++++++++++++++++ go.mod | 5 +++++ go.sum | 12 ++++++++++++ 3 files changed, 49 insertions(+) create mode 100644 cmd/mebius/main.go create mode 100644 go.mod create mode 100644 go.sum diff --git a/cmd/mebius/main.go b/cmd/mebius/main.go new file mode 100644 index 0000000..d5f63d1 --- /dev/null +++ b/cmd/mebius/main.go @@ -0,0 +1,32 @@ +package main + +import ( + "fmt" + "log" + "os" + + "github.com/urfave/cli/v2" +) + +func main() { + // 帮助信息模板 + cli.AppHelpTemplate = fmt.Sprintf(`%s +AUTHOR : TigaTeam + +GitHub: https://github.com/tigateam/mebius +`, cli.AppHelpTemplate) + + app := &cli.App{ + Name: "version", + Usage: "show current binary version info | 显示当前版本信息", + Action: func(c *cli.Context) error { + fmt.Printf(`Mebius v0.0.3 功能正在开发中,敬请期待。。。`) + return nil + }, + } + + err := app.Run(os.Args) + if err != nil { + log.Fatal(err) + } +} diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..eaf5f75 --- /dev/null +++ b/go.mod @@ -0,0 +1,5 @@ +module github.com/tigateam/mebius + +go 1.16 + +require github.com/urfave/cli/v2 v2.3.0 // indirect diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..012feeb --- /dev/null +++ b/go.sum @@ -0,0 +1,12 @@ +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d h1:U+s90UTSYgptZMwQh2aRr3LuazLJIa+Pg3Kc1ylSYVY= +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q= +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/urfave/cli/v2 v2.3.0 h1:qph92Y649prgesehzOrQjdWyxFOp/QVM+6imKHad91M= +github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=