mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-14 20:33:59 +02:00
Add support for Go 1.6 block keyword in templates
NOTE: Needs Go 1.6 to use the new feature. Fixes #1832
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user