Better documentation

This commit is contained in:
Manu Mtz-Almeida
2015-07-05 03:26:30 +02:00
parent c9272120b4
commit 5f2f8d9cb4
2 changed files with 73 additions and 46 deletions

View File

@ -182,6 +182,11 @@ func (c *Context) MustGet(key string) interface{} {
/************************************/
// Query is a shortcut for c.Request.URL.Query().Get(key)
// It is used to return the url query values.
// ?id=1234&name=Manu
// c.Query("id") == "1234"
// c.Query("name") == "Manu"
// c.Query("wtf") == ""
func (c *Context) Query(key string) (va string) {
va, _ = c.query(key)
return