chore: style fixes from go fix (#10846)
Just `go fix ./...` Signed-off-by: Jakob Borg <jakob@kastelo.net>
This commit is contained in:
+1
-4
@@ -311,10 +311,7 @@ func authLDAP(username string, password string, cfg config.LDAPConfiguration) bo
|
||||
|
||||
func formatOptionalPercentS(template string, username string) string {
|
||||
var replacements []any
|
||||
nReps := strings.Count(template, "%s") - strings.Count(template, "%%s")
|
||||
if nReps < 0 {
|
||||
nReps = 0
|
||||
}
|
||||
nReps := max(strings.Count(template, "%s")-strings.Count(template, "%%s"), 0)
|
||||
for range nReps {
|
||||
replacements = append(replacements, username)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user