mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-16 05:16:35 +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
|
// DefaultQuery returns the keyed url query value if it exists, othewise it returns the
|
||||||
// specified defaultValue.
|
// specified defaultValue.
|
||||||
// ```
|
|
||||||
// /?name=Manu
|
// /?name=Manu
|
||||||
// c.DefaultQuery("name", "unknown") == "Manu"
|
// c.DefaultQuery("name", "unknown") == "Manu"
|
||||||
// c.DefaultQuery("id", "none") == "none"
|
// c.DefaultQuery("id", "none") == "none"
|
||||||
// ```
|
|
||||||
func (c *Context) DefaultQuery(key, defaultValue string) string {
|
func (c *Context) DefaultQuery(key, defaultValue string) string {
|
||||||
if va, ok := c.query(key); ok {
|
if va, ok := c.query(key); ok {
|
||||||
return va
|
return va
|
||||||
|
Loading…
x
Reference in New Issue
Block a user