title: How to find a character index in Golang?
body: <p>I'm trying to find "@" string character in Go but I cannot find a way to do it. I know how to index characters like "HELLO[1]" which would output "E". However I'm trying to find index number of the found char.</p>
  
  <p>In Python I'd do it in following way:</p>
  
  <pre><code>x = "chars@arefun"
  split = x.find("@")
  chars = x[:split]
  arefun = x[split+1:]
  
  &gt;&gt;&gt;print split
  5
  &gt;&gt;&gt;print chars
  chars
  &gt;&gt;&gt;print arefun
  arefun
  </code></pre>
  
  <p>So chars would return "chars" and arefun would return "arefun" while using "@" delimeter. I've been trying to find solution for hours and I cannot seem to find proper way to do it in Golang.</p>