I am playing with Go but I am having a very hard time doing things that are very simple in other languages.
I\'d like to reproduce a similar syntax:
If what you are looking is indeed python list comprehension, there is no such syntactic equivalent in go AFAIK.
The way to do it is to create a function that take a slice and a function (to test the condition) and return a new slice.
EDIT: Well looks like there is already such a feature in Go. cf VonC