Sample crud operation using Golang and MySql
/posts
GET
200
/posts
POST
title, content
201
/posts/{id}
GET
200
/posts/{id}
PUT
title, content
200
/posts/{id}
DELETE
204
First clone the repo then go to go-mysql-crud folder. After that build your image and run by docker. Make sure you have docker in your machine.
git clone https://github.com/s1s1ty/go-mysql-crud.git
cd go-mysql-crud
chmod +x run.sh
./run.sh
docker-compose up