diff --git a/main.go b/main.go index debcf10..b992fbd 100644 --- a/main.go +++ b/main.go @@ -32,11 +32,11 @@ var argPort = flag.Int("port", 8080, "port to listen") var maxProcs = flag.Int("max_procs", 0, "max number of CPUs that can be used simultaneously. Less than 1 for default (number of cores).") func main() { - flag.Parse() + flag.Parse() setMaxProcs() r := gin.Default() - r.Use(ginglog.Logger(3 * time.Second)) + r.Use(ginglog.Logger(3 * time.Second)) r.Use(gin.Recovery()) @@ -47,7 +47,7 @@ func main() { r.StaticFS("/static", route.Static("")) r.GET("/api", route.Api) - r.GET("/page", route.Page) + r.GET("/self", route.Self) r.GET("/metric", route.Metric) r.GET("/health", func(c *gin.Context) { c.String(200, "OK! - mnemonics services are fully operational!") @@ -58,7 +58,6 @@ func main() { r.HTMLRender = util.Default() r.GET("/", route.Index) - glog.Info("bootstrapped application") r.Run() // listen and server on 0.0.0.0:8080 } diff --git a/model/group.go b/model/group.go new file mode 100644 index 0000000..0c3b4f2 --- /dev/null +++ b/model/group.go @@ -0,0 +1 @@ +package model \ No newline at end of file diff --git a/model/user.go b/model/user.go new file mode 100644 index 0000000..ef17aef --- /dev/null +++ b/model/user.go @@ -0,0 +1,4 @@ +package model + + +inter \ No newline at end of file diff --git a/route/page.go b/route/self.go similarity index 79% rename from route/page.go rename to route/self.go index 2a65453..604a948 100644 --- a/route/page.go +++ b/route/self.go @@ -2,7 +2,7 @@ package route import "github.com/gin-gonic/gin" -func Page(c *gin.Context) { +func Self(c *gin.Context) { content := gin.H{"Hello": "World"} c.JSON(200, content) }