change folder struct
This commit is contained in:
parent
fdfae04892
commit
078461b8cd
5
main.go
5
main.go
@ -1,7 +1,7 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.trj.tw/golang/go-gallery/modules/routes"
|
"git.trj.tw/golang/go-gallery/routers/routes"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -9,5 +9,8 @@ var server *gin.Engine
|
|||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
server = routes.NewServ()
|
server = routes.NewServ()
|
||||||
|
|
||||||
|
routes.SetDefaultRoutes(server)
|
||||||
|
|
||||||
server.Run(":10230")
|
server.Run(":10230")
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@ func NewServ() *gin.Engine {
|
|||||||
return r
|
return r
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetDefaultRoutes - set default
|
// SetDefaultRoutes -
|
||||||
func SetDefaultRoutes(r *gin.Engine) {
|
func SetDefaultRoutes(r *gin.Engine) {
|
||||||
r.GET("/", func(c *gin.Context) {
|
r.GET("/", func(c *gin.Context) {
|
||||||
c.JSON(200, gin.H{
|
c.JSON(200, gin.H{
|
Loading…
Reference in New Issue
Block a user