This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
packagedemo_simple
import(
"github.com/spf13/cobra"
"goskeleton/app/global/variable"
"time"
)
var(
LogActionstring
Datestring
logger=variable.ZapLog.Sugar()
)
// 简单示例
varDemoSimple=&cobra.Command{
Use:"demo_simple",
Aliases:[]string{"demo_simple"},// 定义别名
Short:"这是一个最简单的demo示例",
Long:`调用方法:
1.进入项目根目录(Ginkeleton)。
2.执行 go run cmd/cli/main.go demo_simple -h //可以查看使用指南
3.执行 go run cmd/cli/main.go demo_simple -A create // 通过 Action 动作执行相应的命令