Functions are central to Go. They are defined with the `func` keyword. Go supports multiple return values, named return values, and variadic parameters.
Structuring code.
Function definition and multiple returns.
func add(x int, y int) int {
return x + y
}
func swap(x, y string) (string, string) {
return y, x
}
func main() {
a, b := swap("hello", "world")
fmt.Println(a, b)
}
Error handling in Go is typically done by returning an `error` as the last return value.