示例#1
0
文件: main.go 项目: spekode/odin
func greetGreetee(c cli.Command) {
	greeting := c.Parent().Param("greeting")
	greetee := c.Param("greetee")
	str := fmt.Sprintf("%s %s", greeting, greetee)
	str = styleByFlags(str, c)
	c.Println(str, strings.Join(c.Args().Strings(), " "))
}
示例#2
0
文件: main.go 项目: spekode/odin
// the greet command run by the root command
func greet(c cli.Command) {
	greeting := c.Param("greeting")
	str := fmt.Sprintf("%s", greeting)
	str = styleByFlags(str, c)
	c.Println(str)
}