Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save shockalotti/77ab4f6ce13354aea079 to your computer and use it in GitHub Desktop.
Save shockalotti/77ab4f6ce13354aea079 to your computer and use it in GitHub Desktop.
Go Golang - return multiple values from a function
package main
import "fmt"
func f() (int,int,int) {
return 5,6,7
}
func main() {
x,y,z:=f()
fmt.Println(x,y,z)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment