Skip to content

多返回值

https://gobyexample-cn.github.io/multiple-return-values

go
func vals() (int, int) {
    return 3, 7
}

(int, int) 表示这个函数返回两个 int 的值