1 Star 0 Fork 0

小鱼儿小董子/dongli-platform

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
main.go 738 Bytes
一键复制 编辑 原始数据 按行查看 历史
GuoLei 提交于 2024-06-22 17:39 +08:00 . feat(project): create project
package main
import (
"github.com/spf13/cobra"
)
const (
defaultMail = "localhost:8081"
defaultUsername = "test"
)
var options struct {
mail string
username string
}
func main() {
rootCmd := &cobra.Command{
Use: "cond_cli",
Short: "Run a mail CLI",
}
rootCmd.PersistentFlags().StringVar(&options.mail, "mail", defaultMail, "mail service (<host>:<port>)")
rootCmd.PersistentFlags().StringVar(&options.username, "username", defaultUsername, "username for authentication")
{
shell := &cobra.Command{
Use: "shell",
Short: "Run an interactive mail service client",
Run: func(cmd *cobra.Command, args []string) {
//TODO add client
},
}
rootCmd.AddCommand(shell)
}
_ = rootCmd.Execute()
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/wanjimao/dongli-platform.git
git@gitee.com:wanjimao/dongli-platform.git
wanjimao
dongli-platform
dongli-platform
v0.0.59

搜索帮助