title: Print looped int as a string
body: <p>I have a custom type looped to display all of the fields given. The purpose of this is to be able to format it a little better than a long, endless single line. However, printing it within the loop won't work, everything I've tried simply prints a string of a single line versus all 4 from the array.</p>
  <pre class="lang-golang prettyprint-override"><code>type Rule struct {
      Value string `json:&quot;value&quot;`
      Tag   string `json:&quot;tag&quot;`
      Id    string `json:&quot;id&quot;`
  }
  
  func test() string {
      get, err := getRules()
      if err != nil {
          panic(err)
      }
  
      for _, r := range get {
          fmt.Printf(&quot;value:%v, tag:%v, id:%v\n&quot;, r.Value, r.Tag, r.Id)
      }
  
      // need to return it as a string like below
      return fmt.Sprintf(&quot;%v&quot;, list)
  }
  </code></pre>
  <p>is there a way to easily create a variable <code>list</code> out of that? So I can display it as a string? That prints:</p>
  <pre><code>value:x0, tag:t0, id:i0
  value:x1, tag:t1, id:i1
  value:x2, tag:t2, id:i2
  value:x3, tag:t3, id:i3
  </code></pre>
  <p>from <code>fmt.Printf(get)</code></p>
  <pre><code>[{x0 t0 i0} {x1 t1 i1} {x2 t2 i2} {x3 t3 i3}]
  </code></pre>
  <p>I'm essentially trying to convert a custom type to a string so that I can display it better.</p>