providers/os: Change name of fileExists to exists

This commit is contained in:
Sasha Koshka 2024-12-07 21:50:53 -05:00
parent 891e4dc140
commit 0d456b7508

View File

@ -28,7 +28,7 @@ type Provider struct {
func (this *Provider) FuncMap () template.FuncMap { func (this *Provider) FuncMap () template.FuncMap {
return template.FuncMap { return template.FuncMap {
"env": funcEnv, "env": funcEnv,
"fileExists": funcFileExists, "exists": funcExists,
"isFile": funcIsFile, "isFile": funcIsFile,
"isDir": funcIsDir, "isDir": funcIsDir,
"statFile": funcStatFile, "statFile": funcStatFile,
@ -44,7 +44,7 @@ func funcEnv (name string) string {
return os.Getenv(name) return os.Getenv(name)
} }
func funcFileExists (name string) (bool) { func funcExists (name string) (bool) {
_, err := os.Stat(name) _, err := os.Stat(name)
return err == nil return err == nil
} }