Go Series: Learning How to Build a Web Service Using Go from Scratch Pt. 15 — Putting It Together
3 min readJul 18, 2023
Let’s put everything we’ve got together.
We create a main.go
which calls…
func main() {
r := gin.Default()
db, error := tools.SetupDB() // assuming we get a function to do this and returns a *gorm.DB instance
routes.SetupRoutes(r, db) // calls route.go file to set up…