Skip to content
Myr

docs(context): align inline comments in GetPostForm example (#4675)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Standardize comment alignment in GetPostForm documentation example to improve readability and maintain consistency with code formatting conventions.

authored by Leehainuo · committed by GitHub · parent 96ece6a · Browse files · 1 file+2 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−2 removed

  • other:+2 added−2 removed

1 file+2 added−2 removed

modified:context.go+2 added-2 removed
617 unmodified lines
618// otherwise it returns ("", false).619// For example, during a PATCH request to update the user's email:620//621// email=mail@example.com --> ("mail@example.com", true) := GetPostForm("email") // set email to "mail@example.com"622// email= --> ("", true) := GetPostForm("email") // set email to ""623// --> ("", false) := GetPostForm("email") // do nothing with email622// email= --> ("", true) := GetPostForm("email") // set email to ""623// --> ("", false) := GetPostForm("email") // do nothing with email624func (c *Context) GetPostForm(key string) (string, bool) {625 if values, ok := c.GetPostFormArray(key); ok {626 return values[0], ok627 }
889 unmodified lines