more examples
This commit is contained in:
16
gobyexample/multiple-return-values.go
Normal file
16
gobyexample/multiple-return-values.go
Normal file
@ -0,0 +1,16 @@
|
||||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
func vals() (int, int) {
|
||||
return 3,7
|
||||
}
|
||||
|
||||
func main() {
|
||||
a,b := vals()
|
||||
fmt.Println(a)
|
||||
fmt.Println(b)
|
||||
|
||||
_, c := vals()
|
||||
fmt.Println(c)
|
||||
}
|
Reference in New Issue
Block a user