Merge aba8867fc541410f5c6e1ebdd12c74c680a5d721 into 52fcc5dbf6e94df33ad313858fb94b713e9d1b4a

This commit is contained in:
inaba 2015-12-17 05:36:51 +00:00
commit 4906da1f7c

View File

@ -212,11 +212,9 @@ func (c *Context) DefaultPostForm(key, defaultValue string) string {
// DefaultQuery returns the keyed url query value if it exists, othewise it returns the
// specified defaultValue.
// ```
// /?name=Manu
// c.DefaultQuery("name", "unknown") == "Manu"
// c.DefaultQuery("id", "none") == "none"
// ```
func (c *Context) DefaultQuery(key, defaultValue string) string {
if va, ok := c.query(key); ok {
return va