title: How to split Golang strings without deleting separator?
body: <p>According to the answer at <a href="https://stackoverflow.com/questions/16551354/how-to-split-a-string-and-assign-it-to-variables-in-golang">How to split a string and assign it to variables in Golang?</a> splitting a string results in an array of strings where the separator is not present in any of the strings in the array. Is there a way to split strings such that the separator is on the last line of a given string?</p>
  
  <p>e.x.</p>
  
  <pre><code>s := strings.split("Potato:Salad:Popcorn:Cheese", ":")
  for _, element := range s {
      fmt.Printf(element)
  }
  </code></pre>
  
  <p>outputs:</p>
  
  <pre><code>Potato
  Salad
  Popcorn
  Cheese
  </code></pre>
  
  <p>I wish to output the following instead:</p>
  
  <pre><code>Potato:
  Salad:
  Popcorn:
  Cheese
  </code></pre>
  
  <p>I know I could theoretically append ":" to the end of each element except for the last, but I'm looking for a more general, elegant solution if possible.</p>