title: How to print elements in slice without bracket in Go line by line?
body: <pre><code>package main
  
  import "fmt"
  
  func main() {
      var s []int
      s = append(s, 2, 3, 4)
      printSlice(s)
  }
  
  func printSlice(s []int) {
      fmt.Printf("len=%d cap=%d %v\n", len(s), cap(s), s)
  }
  </code></pre>
  
  <p>Playground: <a href="https://play.golang.org/p/tx8gmx5eR7B" rel="nofollow noreferrer">https://play.golang.org/p/tx8gmx5eR7B</a></p>
  
  <p>Output:</p>
  
  <pre><code>len=3 cap=4 [2 3 4]
  </code></pre>
  
  <p>Output should be:</p>
  
  <pre><code>2
  3
  4
  </code></pre>
  
  <p>I want it without loop.</p>