title: splitting values in []string in go
body: <p>I am a novice in Go programming language.
  I am writing a code to input from cli for client and pass the values to server for processing. both client and server are residing locally.  </p>
  
  <p>code :</p>
  
  <pre><code>package main
  
  import (
      "flag"
      "fmt"
      "strings"
  )
  
  func main() {
  
      text := gettext()
      fmt.Println(text)
  
      result := strings.Split(text, " ")
  
      for i := range result {
  
          fmt.Println(result[i])
      }
  
  }
  
  func gettext() []string {
  
      flag.Parse()
      text := flag.Args()
  
      if len(text) &lt; 1 {
  
          fmt.Println("Please enter radius")
  
      }
  
      return text
  }
  </code></pre>
  
  <p>when i run from command line its is giving me following error :cannot use text (type []string) as type string in argument to strings.Split</p>
  
  <p>Basically i want to separately print values from []string .</p>
  
  <p>Can you please let me know how to do it.
  I tried using strings.split.</p>
  
  <p>Thanks.</p>