Skip to content

Instantly share code, notes, and snippets.

@Mayankgupta688
Created March 22, 2023 05:08
Show Gist options
  • Save Mayankgupta688/8659155dfd60172c639cc89e7340ac61 to your computer and use it in GitHub Desktop.
Save Mayankgupta688/8659155dfd60172c639cc89e7340ac61 to your computer and use it in GitHub Desktop.
package main
import "fmt"
func main() {
getData(1, 2)
getData(1, 2, 3)
}
func getData(inputData ...int) {
fmt.Println("Number of Parameter Received:", len(inputData))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment