Functions can take multiple parameters. List them separated by commas:
func add(a int, b int) {
fmt.Println(a + b)
}
When consecutive parameters share the same type, you can shorten the declaration:
func add(a, b int) {
fmt.Println(a + b)
}
Both versions work the same way. The shorter form reduces repetition when you have several parameters of the same type.