Go language to operate database
The Go language provides database operations, and there is sql/driver under the package.
This package is used to define the interface for operating the database, which ensures that no matter which database is used, the operation method is the same;
Preparation:
Download driver
You need to execute the corresponding command in the folder where the code is located
go get github.com/go-sql-driver/mysql
PS D:\GolandData> go get github.com/go-sql-driver/mysql
go: downloading github.com/go-sql