i want to used type []string to ...string when call some function with variable parameters. in go lang code.
write below code:
correct code:
error code:
write below code:
func f(p ...string){ // ... }
correct code:
var p []string f(p...)
error code:
var p []string f(p)
it said:
cannot use columns (type []string) as type string in argument to string
No comments:
Post a Comment