package main import ( "net/http" "github.com/gin-gonic/gin" "os" ) type App struct { Router *mux.Router DB *sql.DB } func (a *App) Initialize(user, password, dbname string) { } func (a *App) Run(addr string) { } func main() { r := gin.Default() r.GET("/", func(c *gin.Context) { c.JSON(http.StatusOK, gin.H{"data": "hello world"}) }) r.Run() }