Это работает:
package main
import "fmt"
func obtain2Values() (int, int) {
return 1, 2
}
func process3Values(a, b int, c string){
fmt.Printf("%v %v %v\n", a, b, c)
}
func main() {
a, b := obtain2Values()
process3Values(a, b,":)")
// process3Values(obtain2Values(), ":)")
}
process3Values (receive2Values (), ":)") не работает:
./prog.go:16:16: not enough arguments in call to process3Values
./prog.go:16:30: multiple-value obtain2Values() in single-value context