aboutsummaryrefslogtreecommitdiffhomepage
path: root/caddyconfig/caddyfile/importgraph.go
diff options
context:
space:
mode:
Diffstat (limited to 'caddyconfig/caddyfile/importgraph.go')
-rw-r--r--caddyconfig/caddyfile/importgraph.go8
1 files changed, 2 insertions, 6 deletions
diff --git a/caddyconfig/caddyfile/importgraph.go b/caddyconfig/caddyfile/importgraph.go
index d5037fe62..ca859299d 100644
--- a/caddyconfig/caddyfile/importgraph.go
+++ b/caddyconfig/caddyfile/importgraph.go
@@ -16,6 +16,7 @@ package caddyfile
import (
"fmt"
+ "slices"
)
type adjacency map[string][]string
@@ -91,12 +92,7 @@ func (i *importGraph) areConnected(from, to string) bool {
if !ok {
return false
}
- for _, v := range al {
- if v == to {
- return true
- }
- }
- return false
+ return slices.Contains(al, to)
}
func (i *importGraph) willCycle(from, to string) bool {