main.go 277 字节
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/af"
)

func main() {
	conn, err := af.Open("localhost", "root", "taosdata", "", 6030)
	defer conn.Close()
	if err != nil {
		fmt.Println("failed to connect, err:", err)
	} else {
		fmt.Println("connected")
	}
}