style: apply gofmt modernization fixes

This commit is contained in:
Julien Neuhart
2026-06-02 19:56:50 +02:00
parent a6faa892a8
commit 60482a5cdf
4 changed files with 7 additions and 10 deletions

View File

@@ -2,6 +2,7 @@ package gotenberg
import (
"net/url"
"slices"
)
// maxAttrRunes bounds the length of a string span attribute to keep payload
@@ -45,10 +46,8 @@ func RedactURL(raw string) string {
// a span attribute or metric dimension bounded even when an upstream tool
// introduces a new enum value.
func MapEnum(value string, allowed ...string) string {
for _, candidate := range allowed {
if value == candidate {
return value
}
if slices.Contains(allowed, value) {
return value
}
return "other"
}