chore: update linter.
This commit is contained in:
parent
3e60863e2d
commit
230c2e5cc2
6 changed files with 7 additions and 7 deletions
|
@ -98,7 +98,7 @@ func (c *customErrors) ServeHTTP(rw http.ResponseWriter, req *http.Request) {
|
|||
var query string
|
||||
if len(c.backendQuery) > 0 {
|
||||
query = "/" + strings.TrimPrefix(c.backendQuery, "/")
|
||||
query = strings.Replace(query, "{status}", strconv.Itoa(code), -1)
|
||||
query = strings.ReplaceAll(query, "{status}", strconv.Itoa(code))
|
||||
}
|
||||
|
||||
pageReq, err := newRequest(backendURL + query)
|
||||
|
|
|
@ -586,7 +586,7 @@ WqeUSNGYV//RunTeuRDAf5OxehERb1srzBXhRZ3cZdzXbgR/`,
|
|||
|
||||
content := sanitize(test.toSanitize)
|
||||
|
||||
expected := url.QueryEscape(strings.Replace(test.expected, "\n", "", -1))
|
||||
expected := url.QueryEscape(strings.ReplaceAll(test.expected, "\n", ""))
|
||||
assert.Equal(t, expected, content, "The sanitized certificates should be equal")
|
||||
})
|
||||
}
|
||||
|
|
|
@ -104,7 +104,7 @@ func (p *Provider) buildConfiguration(ctx context.Context, applications *maratho
|
|||
}
|
||||
|
||||
func getServiceName(app marathon.Application) string {
|
||||
return strings.Replace(strings.TrimPrefix(app.ID, "/"), "/", "_", -1)
|
||||
return strings.ReplaceAll(strings.TrimPrefix(app.ID, "/"), "/", "_")
|
||||
}
|
||||
|
||||
func (p *Provider) buildServiceConfiguration(ctx context.Context, app marathon.Application, extraConf configuration, conf *dynamic.HTTPConfiguration) error {
|
||||
|
|
|
@ -96,8 +96,8 @@ func loadTestCert(certName string, uppercase bool) (*tls.Certificate, error) {
|
|||
}
|
||||
|
||||
staticCert, err := tls.LoadX509KeyPair(
|
||||
fmt.Sprintf("../../integration/fixtures/https/%s.cert", strings.Replace(certName, "*", replacement, -1)),
|
||||
fmt.Sprintf("../../integration/fixtures/https/%s.key", strings.Replace(certName, "*", replacement, -1)),
|
||||
fmt.Sprintf("../../integration/fixtures/https/%s.cert", strings.ReplaceAll(certName, "*", replacement)),
|
||||
fmt.Sprintf("../../integration/fixtures/https/%s.key", strings.ReplaceAll(certName, "*", replacement)),
|
||||
)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue