title: Array Varchar (psql) to array string (golang)
body: <p>I would like to know how i can get my array varchar in my psql database in array string in go for render it in json.</p>
  
  <p>I actually do that</p>
  
  <p>In creation of my table i create my column like that :</p>
  
  <pre><code>tags varchar(50)[] default NULL
  </code></pre>
  
  <p>when i use my select request for get it in golang :</p>
  
  <pre><code>var rowtags []uint8
  err = rows.Scan(&amp;rowtags)
  if err != nil {
      log.Fatal(err)
  }
  </code></pre>
  
  <p>i have try to make a fonction that transform uint8[] to string[]</p>
  
  <pre><code>func Uint8toString(array []uint8) []string {
  
      var ret = make([]string, len(array))
      for i := 0; i &lt; len(array); i++{
          ret[i] = string(array[i])
      }
      return (ret)
  }
  </code></pre>
  
  <p>so i apply function of my var rowstag</p>
  
  <pre><code>var tags := Uint8toString(rowtags)
  </code></pre>
  
  <p>and when i render struct where var tags is, I get that</p>
  
  <pre><code>  "Tags": [
      "{",
      "#",
      "c",
      ",",
      "#",
      "c",
      ",",
      "#",
      "c",
      "o",
      "u",
      "c",
      "o",
      "u",
      ",",
      "#",
      "c",
      "d",
      "}"
    ],
  </code></pre>
  
  <p>of course I would like it</p>
  
  <pre><code>  "Tags": [
      "#c",
      "#c",
      "#coucou",
      "#cd"
    ],
  </code></pre>
  
  <p>thank's for helping me , I'm on golang a short time , and I find no solution.</p>