mirror of
https://github.com/aquasecurity/trivy.git
synced 2025-12-12 07:40:48 -08:00
13 lines
228 B
Go
13 lines
228 B
Go
package path
|
|
|
|
import (
|
|
"slices"
|
|
"strings"
|
|
)
|
|
|
|
// Contains reports whether the path contains the subpath.
|
|
func Contains(filePath, subpath string) bool {
|
|
ss := strings.Split(filePath, "/")
|
|
return slices.Contains(ss, subpath)
|
|
}
|