diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2016-02-09 18:39:17 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2016-03-10 10:53:54 +0100 |
commit | a2abad9677491bd8eac10ddbd5276384db007d09 (patch) | |
tree | fa8174f7ac163c2614b7aa7ff092907e2ab74070 /helpers | |
parent | 924028a9be4e468b38f3b7a530253c7c09a0d10e (diff) |
Add support for Go 1.6 block keyword in templates
NOTE: Needs Go 1.6 to use the new feature.
Fixes #1832
Diffstat (limited to 'helpers')
-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) |