chore: migrate to Go modules

This commit is contained in:
fengzhiqiang
2026-07-10 14:17:07 +08:00
parent ecfba6e209
commit 7c49f6d2c6
530 changed files with 247968 additions and 205 deletions
+24
View File
@@ -0,0 +1,24 @@
// +build go1.7
package mux
import (
"context"
"net/http"
)
func contextGet(r *http.Request, key interface{}) interface{} {
return r.Context().Value(key)
}
func contextSet(r *http.Request, key, val interface{}) *http.Request {
if val == nil {
return r
}
return r.WithContext(context.WithValue(r.Context(), key, val))
}
func contextClear(r *http.Request) {
return
}