Skip to content

Commit

Permalink
add init setup.
Browse files Browse the repository at this point in the history
  • Loading branch information
eddycjy committed Feb 2, 2019
1 parent baa9c3a commit 3c09cf4
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,27 @@ import (
"log"
"net/http"

"github.com/EDDYCJY/go-gin-example/models"
"github.com/EDDYCJY/go-gin-example/pkg/gredis"
"github.com/EDDYCJY/go-gin-example/pkg/logging"
"github.com/EDDYCJY/go-gin-example/pkg/setting"
"github.com/EDDYCJY/go-gin-example/routers"
"github.com/EDDYCJY/go-gin-example/models"
"github.com/EDDYCJY/go-gin-example/pkg/logging"
"github.com/EDDYCJY/go-gin-example/pkg/gredis"
)

func init() {
setting.Setup()
models.Setup()
logging.Setup()
gredis.Setup()
}

// @title Golang Gin API
// @version 1.0
// @description An example of gin
// @termsOfService https://github.com/EDDYCJY/go-gin-example

// @license.name MIT
// @license.url https://github.com/EDDYCJY/go-gin-example/blob/master/LICENSE
func main() {
setting.Setup()
models.Setup()
logging.Setup()
gredis.Setup()

routersInit := routers.InitRouter()
readTimeout := setting.ServerSetting.ReadTimeout
writeTimeout := setting.ServerSetting.WriteTimeout
Expand Down

0 comments on commit 3c09cf4

Please sign in to comment.