gin.New()

判断是否为debug模式,是就写入下面这一段日志到系统标准输出

[GIN-debug]  [WARNING] Running in "debug" mode. Switch to "release" mode in production.

- using env:  export GIN_MODE=release

- using code:  gin.SetMode(gin.ReleaseMode)

之后就接着创建框架的实例对象gin.go -> Engine struct,初始化后将该实例的指针返回.

你可能感兴趣的:(gin.New())