I have a variable that i think is of type "[]interface {}"
- How do i detect it
- Convert to array ?
Here's the code:
var s string
switch value1 := value1.(type) {
case int:
s = strconv.Itoa(value1)
case float64:
s = strconv.FormatFloat(value1, 'f', 0, 64)
//case array:
//fmt.Printf("array")
default :
fmt.Printf("
value=v+%",value1)
}
And the output is:
value=v+%!(NOVERB)%!(EXTRA []interface {}=