From c467186d2004be8ade88a35f5bcf71cc2c676635 Mon Sep 17 00:00:00 2001 From: Manu Mtz-Almeida Date: Mon, 18 May 2015 20:52:26 +0200 Subject: [PATCH] Renames Negotiate.HTMLPath to Negotiate.HTMLName --- context.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/context.go b/context.go index 1f4e8ac..8593660 100644 --- a/context.go +++ b/context.go @@ -420,7 +420,7 @@ func (c *Context) Stream(step func(w io.Writer) bool) { type Negotiate struct { Offered []string - HTMLPath string + HTMLName string HTMLData interface{} JSONData interface{} XMLData interface{} @@ -434,11 +434,8 @@ func (c *Context) Negotiate(code int, config Negotiate) { c.JSON(code, data) case binding.MIMEHTML: - if len(config.HTMLPath) == 0 { - panic("negotiate config is wrong. html path is needed") - } data := chooseData(config.HTMLData, config.Data) - c.HTML(code, config.HTMLPath, data) + c.HTML(code, config.HTMLName, data) case binding.MIMEXML: data := chooseData(config.XMLData, config.Data)