title: Taking a string and splitting it into an array of strings in Golang
body: <p>I am trying to take an array and split it into an array of strings, this is my code:</p>
  
  <pre><code>if split != "" {
  
      for i := 0; i &lt; len(split); i++ {
  
          for j := 0; j &lt; len(split); j += 0 {
  
              splits := []byte(split)
  
              if splits[i] == ' ' {
  
  
                  result := split[i] - split[j]
  
                  for k := 0; k &lt;= i; k++ {
  
                      fitting := make([]byte, result)
                      fitting[k] = splits[k]
                      fmt.Println(fitting[k])
  
                      if k &gt; i-1 {
  
                          fittings := string(fitting[:])
                          word := []string{}
                          words := append(word, fittings)
                          fmt.Println(split, words)
                      }
                  }
  
              }
          }
      }
  }
  return Strings(split)
  </code></pre>
  
  <p>and this is my test case:</p>
  
  <pre><code>fmt.Println(actual, expected)
  
  for i := 0; i &lt; len(expected); i++ {
  
      if actual[i] != expected[i] {
          t.Errorf("does not match")
          t.Fail()
      }
  
  }
  }
  </code></pre>
  
  <p>None of it is really working.</p>