diff options
Diffstat (limited to 'helpers/path.go')
-rw-r--r-- | helpers/path.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/helpers/path.go b/helpers/path.go index 0fce5690f..5536241e5 100644 --- a/helpers/path.go +++ b/helpers/path.go @@ -462,6 +462,11 @@ func FileContains(filename string, subslice []byte, fs afero.Fs) (bool, error) { return afero.FileContainsBytes(fs, filename, subslice) } +// Check if a file contains any of the specified strings. +func FileContainsAny(filename string, subslices [][]byte, fs afero.Fs) (bool, error) { + return afero.FileContainsAnyBytes(fs, filename, subslices) +} + // Check if a file or directory exists. func Exists(path string, fs afero.Fs) (bool, error) { return afero.Exists(fs, path) |