Open plunkets opened 6 years ago
It is possible in Go, with an empty interface.
package main func main() { i := 2.5 j := "test" k := true varia(i, j, k) } func varia(arguments ...interface{}) { for _, v := range arguments { fmt.Print(reflect.TypeOf(v)) } }
Output: float64 string bool
It is possible in Go, with an empty interface.
Output: float64 string bool