Thanks, that works..Also what I normally use in Golang is :
switch v := i.(type) {
case int:
fmt.Printf("Twice %v is %v\n", v, v*2)
case string:
fmt.Printf("%q is %v bytes long\n", v, len(v))
default:
fmt.Printf("I don't know about type %T!\n", v)
}
Also, Should I use templates for this?.. I have quite big case statments sometimes.
