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:
Leehainuo 2026-06-02 21:49:36 +08:00 committed by GitHub
parent 96ece6a141
commit 88c4263538
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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