diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2025-02-12 14:25:46 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-02-12 14:25:46 +0800 |
commit | f58f5bb3d8a92f30112d8914ed7006b72e28df05 (patch) | |
tree | d98327e00983123d28dc1298e9c1a8ec3e192a0a /services/contexttest | |
parent | 06f10656369c7e4274ae4e9f9edb21e1cac520d9 (diff) | |
download | gitea-f58f5bb3d8a92f30112d8914ed7006b72e28df05.tar.gz gitea-f58f5bb3d8a92f30112d8914ed7006b72e28df05.zip |
Avoid duplicate SetContextValue call (#33564)
And fix FIXME and TODO
Diffstat (limited to 'services/contexttest')
-rw-r--r-- | services/contexttest/context_tests.go | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/services/contexttest/context_tests.go b/services/contexttest/context_tests.go index 4615c8404b..98b8bdd63e 100644 --- a/services/contexttest/context_tests.go +++ b/services/contexttest/context_tests.go @@ -67,7 +67,6 @@ func MockContext(t *testing.T, reqPath string, opts ...MockContextOption) (*cont chiCtx := chi.NewRouteContext() ctx := context.NewWebContext(base, opt.Render, nil) - ctx.SetContextValue(context.WebContextKey, ctx) // FIXME: this should be removed because NewWebContext should already set it ctx.SetContextValue(chi.RouteCtxKey, chiCtx) if opt.SessionStore != nil { ctx.SetContextValue(session.MockStoreContextKey, opt.SessionStore) |