title: Converting argument $1 type: unsupported type []interface {}, a slice of interface
body: <p>I try to query on list of userIDs. I am using the Go <a href="https://github.com/lib/pq" rel="nofollow noreferrer">Pq</a> library.</p>
  
  <pre><code>func ListUsers(userIDs []interface{}) (users []User, err error) {
      stm := `SELECT
      U.id,
      (
          CASE WHEN TRIM(UP.first_name || ' ' || UP.last_name) = '' THEN U.id :: TEXT ELSE UP.first_name || ' ' || UP.last_name END
          ) as avatar_name,
  FROM
      users AS U
          JOIN user_profiles UP ON UP.user_id = U.id
  WHERE
          U.id IN ($1);`
  
      rows, err := postgresql.Instance.Query(stm, userIDs)
      defer rows.Close()
      if err != nil &amp;&amp; err != sql.ErrNoRows {
          return
      }
  
      if err == sql.ErrNoRows {
          return users, nil
      }
  
      for rows.Next() {
          var (
              id         int
              AvatarName string
          )
          err = rows.Scan(&amp;id, &amp;AvatarName)
          if err != nil {
              return nil, err
          }
  
          users = append(users, User{ID: id, AvatarName: AvatarName})
      }
  
      return users, nil
  }
  </code></pre>
  
  <p>When I run this it gives error <strong><em>converting argument $1 type: unsupported type []interface {}, a slice of interface</em></strong> </p>