Skip to content

Instantly share code, notes, and snippets.

@nwillc
Created July 15, 2022 19:46
Show Gist options
  • Save nwillc/4362e1b19d3401b146ed9534658de430 to your computer and use it in GitHub Desktop.
Save nwillc/4362e1b19d3401b146ed9534658de430 to your computer and use it in GitHub Desktop.
Go splat example
printV := func(values ...int) { fmt.Println(values) }
args := []int{1, 2, 3, 4}
printv(args...)
// output: [1 2 3 4]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment