有什么方法可以使 Warn 函数起作用吗?func Warn(s string, args ...interface{}) { log.Printf("warn: "+s, args)}func main() { Warn("%d apples, %s ", 10, "good") //it should output the same as below log.Printf("%d apples, %s ", 10, "good")}输出:2009/11/10 23:00:00 warn: [10 %!d(string=good)] apples, %s(MISSING) 2009/11/10 23:00:00 10 apples, good我正在努力使这项工作:http : //play.golang.org/p/W62f2NGDUe
1 回答
- 1 回答
- 0 关注
- 229 浏览
添加回答
举报
0/150
提交
取消