title: Split a string on whitespace in Go?
body: <p>Given an input string such as <code>"  word1   word2 word3   word4  "</code>, what would be the best approach to split this as an array of strings in Go? Note that there can be <em>any</em> number of spaces or unicode-spacing characters between each word.</p>
  
  <p>In Java I would just use <code>someString.trim().split("\\s+")</code>.</p>
  
  <p>(Note: possible duplicate <a href="https://stackoverflow.com/questions/4466091/split-string-using-regular-expression-in-go">Split string using regular expression in Go</a> doesn't give any good quality answer. Please provide an actual example, not just a link to the <code>regexp</code> or <code>strings</code> packages reference.)</p>