Does Go support lambda expressions or anything similar?
I want to port a library from another language that uses lambda expressions (Ruby).
An example that hasn't been provided yet that I was looking for is to assign values directly to variable/s from an anonymous function e.g.
test1, test2 := func() (string, string) {
x := []string{"hello", "world"}
return x[0], x[1]
}()
Note: you require brackets () at the end of the function to execute it and return the values otherwise only the function is returned and produces an assignment mismatch: 2 variable but 1 values error.