fix composite literal uses unkeyed fields warnings, #1050 (#1051)

This commit is contained in:
Eason Lin 2017-08-02 23:00:10 +08:00 committed by Bo-Yi Wu
parent df37e74fa1
commit 4b54b86272

4
gin.go
View File

@ -121,7 +121,7 @@ func New() *Engine {
UseRawPath: false,
UnescapePathValues: true,
trees: make(methodTrees, 0, 9),
delims: render.Delims{"{{", "}}"},
delims: render.Delims{Left: "{{", Right: "}}"},
secureJsonPrefix: "while(1);",
}
engine.RouterGroup.engine = engine
@ -143,7 +143,7 @@ func (engine *Engine) allocateContext() *Context {
}
func (engine *Engine) Delims(left, right string) *Engine {
engine.delims = render.Delims{left, right}
engine.delims = render.Delims{Left: left, Right: right}
return engine
}