Most idiomatic way to select elements from an array in Golang?
<p>I have an array of strings, and I'd like to exclude values that start in <code>foo_</code> OR are longer than 7 characters.</p>

<p>I can loop through each element, run the <code>if</code> statement, and add it to a slice along the way. But I was curious if there was an idiomatic or more golang-like way of accomplishing that.</p>

<p>Just for example, the same thing might be done in Ruby as</p>

<pre><code>my_array.select! { |val| val !~ /^foo_/ &amp;&amp; val.length &lt;= 7 }
</code></pre>