Learning GoLang
参考:https://github.com/astaxie/build-web-application-with-golang/blob/master/zh/11.3.md
Run go test -v
- Run
go test -test.bench=".*"
- Run
go mod init go-langto create a go.mod file in the root of the project - Run
go run basic/book.goto run the book.go file where the main function is located - Run
go get github.com/go-sql-driver/mysqlto install the mysql driver or any other package
- Add
GORMas the ORM to operate on the database - Add
ginas the web framework to handle the web requests - Add
golang-jwtas the JWT middleware to handle the authentication