You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
378 B
Go
26 lines
378 B
Go
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()
|
|
} |