Golang return values of function as input arguments to another
问题 If I have func returnIntAndString() (i int, s string) {...} And I have: func doSomething(i int, s string) {...} Then I can do the following successfully: doSomething(returnIntAndString()) However, let's say I want to add another argument to doSomething like: func doSomething(msg string, i int, s string) {...} Go complains when compiling if I call it like: doSomething("message", returnIntAndString()) With: main.go:45: multiple-value returnIntAndString() in single-value context main.go:45: not