Create and Run MySQL Database, DBNAME : "go_rest_api_crud"
then:
go run main.go
Official binary distributions are available at https://golang.org/dl/.
After downloading a binary release, visit https://golang.org/doc/install for installation instructions.
go mod init rest-api-crud
Gorilla mux
: For creating routes adn HTTP handlers.
go get -u github.com/gorilla/mux
gorm
: An ORM tool for MySQL.
go get -u gorm.io/gorm
mysql
: The MySQL driver.
go get -u github.com/go-sql-driver/mysql
MySQL Database : DBNAME "go_rest_api_crud"