feat: add mapping functions

This commit is contained in:
Justin Lin
2025-08-26 19:49:37 +10:00
parent 0dc1d411f4
commit e770b31402
5 changed files with 35 additions and 7 deletions

View File

@@ -7,7 +7,7 @@ import (
"github.com/gin-gonic/gin"
"github.com/jackc/pgx/v5"
user "tutorial.sqlc.dev/app/internal/author"
"tutorial.sqlc.dev/app/internal/author"
)
func run() error {
@@ -20,8 +20,8 @@ func run() error {
defer conn.Close(ctx)
r := gin.Default()
userCtl := user.NewController(conn)
user.Register(r, &userCtl)
authorCtl := author.NewController(conn)
author.Register(r, &authorCtl)
r.Run(":8000")
return nil