main.go 303 字节
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
package main

import (
	"fmt"

	"github.com/taosdata/driver-go/v2/wrapper"
)

func main() {
	conn, err := wrapper.TaosConnect("localhost", "root", "taosdata", "", 6030)
	defer wrapper.TaosClose(conn)
	if err != nil {
		fmt.Println("fail to connect, err:", err)
	} else {
		fmt.Println("connected")
	}
}