多返回值 package main import "fmt" func add(a int, b int) (int, int) { return a + b, a - b } func main() { sum, sub := add(1, 2) fmt.Println(sum, sub) } 来源:https://www.cnblogs.com/liudianer/p/12378649.html 标签 golang sub