I was wondering if there's a way with Go to declare and initialise multiple variables of different types in one line without using the short declaration syntax :=.
Declaring for example two variables of the same type is possible:
var a, b string = "hello", "world"
Declaring variables of different types with the := syntax is also possible:
c, d, e := 1, 2, "whatever"
This gives me an error instead:
var f int, g string = 1, "test"
Of course I'd like to keep the type otherwise I can just use the := syntax.
Unfortunately I couldn't find any examples so I'm assuming this is just not possible?
If not, anyone knows if there's a plan to introduce such syntax in future releases?