fix(context): make context Value method adhere to Go standards (#3897)

This commit is contained in:
Farmer.Chillax
2024-03-21 21:08:41 +08:00
committed by GitHub
parent 0d9dbbb445
commit 2b1da2b0b3
2 changed files with 6 additions and 2 deletions

View File

@ -1985,7 +1985,7 @@ func TestContextGolangContext(t *testing.T) {
ti, ok := c.Deadline()
assert.Equal(t, ti, time.Time{})
assert.False(t, ok)
assert.Equal(t, c.Value(0), c.Request)
assert.Equal(t, c.Value(ContextRequestKey), c.Request)
assert.Equal(t, c.Value(ContextKey), c)
assert.Nil(t, c.Value("foo"))