Created
January 9, 2017 02:28
-
-
Save gnilchee/a764ed4c0f622115bce734f506a1504d to your computer and use it in GitHub Desktop.
Simple function with multiple input (and types) and multiple returns (and types)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "fmt" | |
func add(x int, y int, greet string) (integer int, res string) { | |
sum := x + y | |
response := greet + ", World" | |
return sum, response | |
} | |
func main() { | |
fmt.Println(add(32, 32, "Hello")) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment