014variadicFuncs

command
v0.0.0-...-db3ee8d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 27, 2021 License: MPL-2.0 Imports: 1 Imported by: 0

README

Variadic Functions

Variadic functions can be called with any number of trailing arguments. For example, fmt.Println() is a variadic function.

An example of a function signature that will take an arbitrary number of ints as arguments func sum(nums ...int){}; also this function doesn't return anything.

Variadic function can be called the usual way with individual arguments. If there are multiple args in a slice, apply them to a variadic function using func(slice...)

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL