Golang中的Postgres查询

I am not sure how to make postgres query where (col1, col2) in 2dslice

I have tried the following:

CREATE TABLE table2 (
  id CHAR(27) NOT NULL,
  lat FLOAT8 NOT NULL,
  lon FLOAT8 NOT NULL,
  PRIMARY KEY (id)
);


latlongdata := [][]float64{}
latlongdata = append(latlongdata, []float64{1.2, 2.3},)
latlongdata = append(latlongdata, []float64{1.3, 2.4},)
......................................
latlongdata = append(latlongdata, []float64{1.4, 2.5},)

fmt.Println(latlongdata)// prints [[1.2 2.3] [1.3 2.4] ....... [1.4 2.5]] (very long array)

Query: r.db.QueryContext(ctx,("SELECT id, lat, lon FROM table2 WHERE (lat, lon) IN $1", latlongdata,)

Can you please suggest how to do it?

Range over the slice and make the query

for _, data := range latlongdata {
 lat := data[0]
 long := data[1]

 err:= r.db.QueryContext(ctx,("SELECT id, lat, lon FROM table2 WHERE lat=$1 AND lon=$2", lat, lon,).scan(&variable)

  if err != nil {
    log.Fatal("unable to execute search query", err)
  }
  // also check if all the fields of "variable" are not null
  // then append the result to an array of variable
  variables = append(variables, variable)
}