fix: remove extra AppVersion context key entry
This commit is contained in:
parent
b329fb3e19
commit
7e3a2db356
6 changed files with 2 additions and 21 deletions
|
|
@ -1,16 +0,0 @@
|
|||
package middleware
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"git.juancwu.dev/juancwu/budgit/internal/ctxkeys"
|
||||
)
|
||||
|
||||
func AppVersion(version string) func(http.Handler) http.Handler {
|
||||
return func(next http.Handler) http.Handler {
|
||||
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
ctx := ctxkeys.WithAppVersion(r.Context(), version)
|
||||
next.ServeHTTP(w, r.WithContext(ctx))
|
||||
})
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue