Golang functions
From wikinotes
// (param type) (return-type)
func greet(name string) string {
return "Hello, " + name
}
Multiple return values
// when multiple return values present, surround with brackets
func find(id int) (string, int) {
// ...
}
// optionally, return values can be named
// (this has no implications for caller, it's simply documentation)
func find(id int) (name string, age int) {
// ...
}