renumber again

This commit is contained in:
Mark McGranaghan
2012-09-23 13:29:28 -07:00
parent 1ef0ead109
commit ebe6383f98
118 changed files with 2 additions and 2 deletions

23
018-returns/returns.go Normal file
View File

@@ -0,0 +1,23 @@
// ## Multiple Return Values
// In Go, a function can return multiple values.
// This feature is used often, for example to
// return a result and an error from a function.
package main
import "fmt"
// The `(int, int)` in this signature shows that the
// function returns 2 ints.
func vals() (int, int) {
return 3, 7
}
func main() {
// Use the 2 different return values from the call.
x, y := vals()
fmt.Println(x)
fmt.Println(y)
}

3
018-returns/returns.sh Normal file
View File

@@ -0,0 +1,3 @@
$ go run returns.go
3
7