代码拉取完成,页面将自动刷新
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()
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。