package main

import (
	"fmt"
)

func get() (num int,query int) {
	num = 1
	query = 2
	return query,num
}
func get2() (num int,query int) {
	num = 1
	query = 2
	return 
}
func main() {
	fmt.Println(get())
	fmt.Println(get2())
}

return的返回值,如果直接打return那么就按照返回列表的类型,如果指定顺序就安装指定的顺序。 

2 1
1 2