Rework error messages
This commit reworks error messages for all commands and makes sure they pass liniting.
This commit is contained in:
parent
d22784e6f5
commit
c31c46ee44
40 changed files with 249 additions and 110 deletions
|
|
@ -14,6 +14,7 @@ import (
|
|||
"github.com/FAU-CDI/wisski-distillery/internal/wisski/ingredient/php"
|
||||
"github.com/FAU-CDI/wisski-distillery/pkg/fsx"
|
||||
"github.com/tkw1536/pkglib/collection"
|
||||
"golang.org/x/exp/slices"
|
||||
|
||||
_ "embed"
|
||||
)
|
||||
|
|
@ -110,7 +111,7 @@ func (prefixes *Prefixes) blocked() ([]string, error) {
|
|||
}
|
||||
|
||||
func hasAnyPrefix(candidate string, prefixes []string) bool {
|
||||
return collection.Any(
|
||||
return slices.ContainsFunc(
|
||||
prefixes,
|
||||
func(prefix string) bool {
|
||||
return strings.HasPrefix(candidate, prefix)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue