在Go中设置函数参数类型

I'm a complete beginner to the Go programming language, and I'm trying to define the parameter types of a Go function called addStuff that simply adds two integers and returns their sum, but I see the following error when I try to compile the function:

prog.go:6: undefined: a
prog.go:6: undefined: b
prog.go:7: undefined: a
prog.go:7: undefined: b
prog.go:7: too many arguments to return
prog.go:11: addStuff(4, 5) used as value

Here's the code that produced this compiler error:

package main

import "fmt"
import "strconv"

func addStuff(a, b){
    return a+b
}

func main() {
    fmt.Println("Hello," + strconv.Itoa(addStuff(4,5)))
}

What am I doing wrong here, and what is the correct way to set the types of parameters in Go?

func addStuff(a int, b int) int {
    return a+b
}

This will make a and b parameters of type int, and have the function return an int. An alternative is func addStuff(a, b int) int which will also make both a and b parameters of type int.

I highly recommend A Tour of Go which teaches the basics of Go.