tpl: Add os.fileExists template function

Fixes #3839
This commit is contained in:
digitalcraftsman
2017-09-28 19:52:34 +02:00
committed by Bjørn Erik Pedersen
parent b6a30283f0
commit 2818878994
4 changed files with 91 additions and 0 deletions

View File

@@ -48,6 +48,13 @@ func init() {
},
)
ns.AddMethodMapping(ctx.FileExists,
[]string{"fileExists"},
[][2]string{
{`{{ fileExists "foo.txt" }}`, `false`},
},
)
return ns
}