mirror of
https://github.com/gin-gonic/gin.git
synced 2025-11-05 01:32:12 +08:00
docs(context): fix some comments (#4396)
Signed-off-by: letreturn <letreturn@outlook.com>
This commit is contained in:
parent
c3d1092b3b
commit
c221133ee8
@ -270,7 +270,7 @@ func (c *Context) Error(err error) *Error {
|
||||
/************************************/
|
||||
|
||||
// Set is used to store a new key/value pair exclusively for this context.
|
||||
// It also lazy initializes c.Keys if it was not used previously.
|
||||
// It also lazy initializes c.Keys if it was not used previously.
|
||||
func (c *Context) Set(key any, value any) {
|
||||
c.mu.Lock()
|
||||
defer c.mu.Unlock()
|
||||
|
||||
@ -39,7 +39,7 @@ func TestLogger(t *testing.T) {
|
||||
|
||||
// I wrote these first (extending the above) but then realized they are more
|
||||
// like integration tests because they test the whole logging process rather
|
||||
// than individual functions. Im not sure where these should go.
|
||||
// than individual functions. I'm not sure where these should go.
|
||||
buffer.Reset()
|
||||
PerformRequest(router, http.MethodPost, "/example")
|
||||
assert.Contains(t, buffer.String(), "200")
|
||||
@ -103,7 +103,7 @@ func TestLoggerWithConfig(t *testing.T) {
|
||||
|
||||
// I wrote these first (extending the above) but then realized they are more
|
||||
// like integration tests because they test the whole logging process rather
|
||||
// than individual functions. Im not sure where these should go.
|
||||
// than individual functions. I'm not sure where these should go.
|
||||
buffer.Reset()
|
||||
PerformRequest(router, http.MethodPost, "/example")
|
||||
assert.Contains(t, buffer.String(), "200")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user