Quantcast
Channel: pass constant list (immutable) in variadic in Go - Stack Overflow
Browsing all 2 articles
Browse latest View live

Answer by Burak Serdar for pass constant list (immutable) in variadic in Go

You cannot pass a slice or array of strings to a function that accepts a variadic argument list of interface{} types. You have to first create an []interface{}, and pass...

View Article



pass constant list (immutable) in variadic in Go

var state = [...]string{"new","submitted","approved","rejected",}In(values ...interface{}) { return}I need to pass an immutable list to a variadic function in go

View Article
Browsing all 2 articles
Browse latest View live




Latest Images