标签:style blog color io sp div on log cti
A function can return any number of results.
This function returns two strings.
package main import "fmt" func swap(x, y string) (string, string) { return y, x } func main() { a, b := swap("hello", "world") fmt.Println(a, b) }
标签:style blog color io sp div on log cti
原文地址:http://www.cnblogs.com/ghgyj/p/4052605.html