packagemainimport("database/sql""fmt""time"_"github.com/taosdata/driver-go/v2/taosRestful")funcmain(){vartaosDSN="root:taosdata@http(localhost:6041)/power"taos,err:=sql.Open("taosRestful",taosDSN)iferr!=nil{fmt.Println("failed to connect TDengine, err:",err)return}defertaos.Close()rows,err:=taos.Query("SELECT ts, current FROM meters LIMIT 2")iferr!=nil{fmt.Println("failed to select from table, err:",err)return}deferrows.Close()forrows.Next(){varrstruct{tstime.Timecurrentfloat32}err:=rows.Scan(&r.ts,&r.current)iferr!=nil{fmt.Println("scan error:\n",err)return}fmt.Println(r.ts,r.current)}}