refactor(gofix): modernize

This commit is contained in:
Julien Neuhart
2026-02-20 21:21:19 +01:00
parent aea7c5952a
commit 2baa59cb3a
29 changed files with 131 additions and 149 deletions

View File

@@ -3,6 +3,7 @@ package pdfengines
import (
"errors"
"fmt"
"slices"
"strings"
flag "github.com/spf13/pflag"
@@ -179,13 +180,7 @@ func (mod *PdfEngines) Validate() error {
continue
}
alreadyInSlice := false
for _, engine := range nonExistingEngines {
if engine == name {
alreadyInSlice = true
break
}
}
alreadyInSlice := slices.Contains(nonExistingEngines, name)
if !alreadyInSlice {
nonExistingEngines = append(nonExistingEngines, name)