Is there any way the function Warn could be made to work?
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")
}
Output:
2009/11/10 23:00:00 warn: [10 %!d(string=good)] apples, %s(MISSING)
2009/11/10 23:00:00 10 apples, good
I'm trying to make this work: http://play.golang.org/p/W62f2NGDUe