Content:
使用go来查询postgressql
Example:
/*
使用go查询postgres 数据库
Mousse 2018.8.22.00-->KM
*/
package main
import (
"database/sql"
"fmt"
_ "github.com/lib/pq"
)
const (
host = "localhost"
port = 5432
user = "root"
password = "123456"
dbname = "test"
)
type DeviceInfo struct {
DeviceNa