docs(comment): Modify comment syntax error (#3389)
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by 王哈哈 · committed by GitHub · parent 8b9c55e · Browse files · 2 files·+4 added−4 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
2 files+4 added−4 removed
- other:+4 added−4 removed
Provenance
- Commit
971fe21- Tree
703400e- Author
王哈哈 <31426858+wanghaha-dev@users.noreply.github.com>- Committer
GitHub <noreply@github.com>- Parent
8b9c55e
2 files changed+4 added−4 removed
modified:CHANGELOG.md+1 added-1 removed
111 unmodified lines112 * chore: rename getQueryCache/getFormCache to initQueryCache/initFormCa ([#2375](https://github.com/gin-gonic/gin/pull/2375))113 * chore(performance): improve countParams ([#2378](https://github.com/gin-gonic/gin/pull/2378))114 * Remove some functions that have the same effect as the bytes package ([#2387](https://github.com/gin-gonic/gin/pull/2387))115 * update:SetMode function ([#2321](https://github.com/gin-gonic/gin/pull/2321))116-* remove a unused type SecureJSONPrefix ([#2391](https://github.com/gin-gonic/gin/pull/2391))116+* remove an unused type SecureJSONPrefix ([#2391](https://github.com/gin-gonic/gin/pull/2391))117 * Add a redirect sample for POST method ([#2389](https://github.com/gin-gonic/gin/pull/2389))118 * Add CustomRecovery builtin middleware ([#2322](https://github.com/gin-gonic/gin/pull/2322))119 * binding: avoid 2038 problem on 32-bit architectures ([#2450](https://github.com/gin-gonic/gin/pull/2450))120 * Prevent panic in Context.GetQuery() when there is no Request ([#2412](https://github.com/gin-gonic/gin/pull/2412))382 unmodified linesmodified:README.md+3 added-3 removed
291 unmodified lines292 func main() {293 router := gin.Default()294 295 // Query string parameters are parsed using the existing underlying request object.296- // The request responds to a url matching: /welcome?firstname=Jane&lastname=Doe296+ // The request responds to an url matching: /welcome?firstname=Jane&lastname=Doe297 router.GET("/welcome", func(c *gin.Context) {298 firstname := c.DefaultQuery("firstname", "Guest")299 lastname := c.Query("lastname") // shortcut for c.Request.URL.Query().Get("lastname")300 391 unmodified lines692 - **Behavior** - These methods use `ShouldBindWith` under the hood. If there is a binding error, the error is returned and it is the developer's responsibility to handle the request and error appropriately.693 694 When using the Bind-method, Gin tries to infer the binder depending on the Content-Type header. If you are sure what you are binding, you can use `MustBindWith` or `ShouldBindWith`.695 696-You can also specify that specific fields are required. If a field is decorated with `binding:"required"` and has a empty value when binding, an error will be returned.696+You can also specify that specific fields are required. If a field is decorated with `binding:"required"` and has an empty value when binding, an error will be returned.697 698 ```go699 // Binding from JSON700 type Login struct {1394 unmodified lines2095 return binding.Validator.ValidateStruct(obj)2096 }2097 2098 // Now we can do this!!!2099-// FormA is a external type that we can't modify it's tag2099+// FormA is an external type that we can't modify it's tag2100 type FormA struct {2101 FieldA string `url:"field_a"`2102 }2103 267 unmodified lines