fixed linting iessues

This commit is contained in:
MohitKatare-protean
2025-04-04 14:59:40 +05:30
parent 593b76427c
commit 49e460f61d
2 changed files with 1 additions and 16 deletions

View File

@@ -17,8 +17,6 @@ type Config struct {
Role string
}
type keyType string
const contextKey = "context"
func NewPreProcessor(cfg *Config) (func(http.Handler) http.Handler, error) {
@@ -39,7 +37,7 @@ func NewPreProcessor(cfg *Config) (func(http.Handler) http.Handler, error) {
return
}
// Extract context from request
// Extract context from request.
reqContext, ok := req["context"].(map[string]interface{})
if !ok {
http.Error(w, fmt.Sprintf("%s field not found or invalid.", contextKey), http.StatusBadRequest)