Files
moxa/_test/variadic6.go
2020-05-03 18:44:04 +02:00

21 lines
208 B
Go

package main
import "fmt"
type A struct {
}
func (a A) f(vals ...bool) {
for _, v := range vals {
fmt.Println(v)
}
}
func main() {
bools := []bool{true}
a := A{}
a.f(bools...)
}
// Output:
// true