Golang Variadic Arguments
Sometimes we don’t know how much parameters will be passed and then comes Variadic Parameters in Golang.
Condition for Variadic Argument:
- Variadic Arguments should only be one and must be placed at last.
- It is taken as Golang Slice, and Slice operations can be done on it.
Variadic Arguments Syntax
<parameter_name> …<type>
Learn more about Golang Variadic Arguments from the Original Post.
Top comments (0)