As long as the types match, you can pass the return values from a function directly into another function as its parameters.
func main() {
showData(getData()) // magic!
}
func showData(a string, b int) {
fmt.Println(a, b)
}
func getData() (string, int) {
return "hi", 42
}
showData(getData()) // magic!
}
func showData(a string, b int) {
fmt.Println(a, b)
}
func getData() (string, int) {
return "hi", 42
}