mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-15 21:06:39 +08:00
fix godoc comment
This commit is contained in:
parent
52fcc5dbf6
commit
aba8867fc5
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user