• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pace / bricks / 13717956986

06 Mar 2025 02:30PM UTC coverage: 51.823% (-4.8%) from 56.612%
13717956986

push

github

web-flow
Merge pull request #406 from pace/gomod-update

This updates all dependencies to the latest version, excluding

github.com/bsm/redislock
github.com/dave/jennifer

as newer versions lead to unwanted behavior.

54 of 82 new or added lines in 9 files covered. (65.85%)

453 existing lines in 15 files now uncovered.

4889 of 9434 relevant lines covered (51.82%)

20.93 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/pkg/redact/middleware/middleware.go
1
// Copyright © 2020 by PACE Telematics GmbH. All rights reserved.
2

3
package middleware
4

5
import (
6
        "net/http"
7

8
        "github.com/pace/bricks/pkg/redact"
9
)
10

11
// Redact provides a pattern redactor middleware to the request context
UNCOV
12
func Redact(next http.Handler) http.Handler {
×
UNCOV
13
        return RedactWithScheme(next, redact.Default)
×
UNCOV
14
}
×
15

16
// RedactWithScheme provides a pattern redactor middleware to the request context
17
// using the provided scheme
UNCOV
18
func RedactWithScheme(next http.Handler, redactor *redact.PatternRedactor) http.Handler {
×
UNCOV
19
        return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
×
UNCOV
20
                ctx := redactor.WithContext(r.Context())
×
UNCOV
21
                next.ServeHTTP(w, r.WithContext(ctx))
×
UNCOV
22
        })
×
23
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc