mirror of
https://github.com/gin-gonic/gin.git
synced 2026-06-04 09:48:17 +08:00
docs(context): align inline comments in GetPostForm example (#4675)
Standardize comment alignment in GetPostForm documentation example to improve readability and maintain consistency with code formatting conventions.
This commit is contained in:
parent
96ece6a141
commit
88c4263538
@ -619,8 +619,8 @@ func (c *Context) DefaultPostForm(key, defaultValue string) string {
|
||||
// For example, during a PATCH request to update the user's email:
|
||||
//
|
||||
// email=mail@example.com --> ("mail@example.com", true) := GetPostForm("email") // set email to "mail@example.com"
|
||||
// email= --> ("", true) := GetPostForm("email") // set email to ""
|
||||
// --> ("", false) := GetPostForm("email") // do nothing with email
|
||||
// email= --> ("", true) := GetPostForm("email") // set email to ""
|
||||
// --> ("", false) := GetPostForm("email") // do nothing with email
|
||||
func (c *Context) GetPostForm(key string) (string, bool) {
|
||||
if values, ok := c.GetPostFormArray(key); ok {
|
||||
return values[0], ok
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user