How to add the Dameng database dm driver in the golang project under the go mod mechanism

Download the dm driver code library

Here I am here I am an engineering project created by beegod and the downloaded version is dm v1.8.11192

Download the driver dm code library of Dameng database to the local project directory,

Download the driver code of Dameng database to the project as shown in the figure

git clone https://gitee.com/travelliu/dm.git

Edit the go.mod file, add the library related to dm in the file, as shown in the red box below, and then save

Then automatically download the dependencies of the dm library through go mod, execute:

go mod tidy

Then reopen go.mod, and you will find that the following two libraries will be automatically included

So far, under the go mod mechanism, the addition of the Dameng database driver to the golang project is complete, and the project is run

Guess you like

Origin blog.csdn.net/u011285281/article/details/128618994