go-mysqlstack is an MySQL protocol library implementing in Go (golang). 使用示例 下载 1 2 3 go get -u github.com/xelabs/go-mysqlstack/driver cd $GOPATH/src/github.com/xelabs/go-mysqlstack/ make test examples/mysqld.go mocks a MySQL server by running: 1 2 > go run mysqld.go 2020/08/22 19:01:44.518045 mysqld.go:102: [INFO] mysqld.server.start.address[:4407] examples/client.go mocks a client and query from the mock MySQL server: 1 2 > go run client.go 2020/08/22 19:01:50.530677 client.go:32: [INFO] results:[[[10 nice name]]] H