mirror of
https://github.com/helmfile/helmfile.git
synced 2026-10-18 03:08:18 +02:00
Implement readDirEntries method
Signed-off-by: vasicvuk <vuk.vasic@asseco-see.rs>
This commit is contained in:
@@ -1,9 +1,12 @@
|
||||
package tmpl
|
||||
|
||||
import "io/fs"
|
||||
|
||||
type Context struct {
|
||||
preRender bool
|
||||
basePath string
|
||||
readFile func(string) ([]byte, error)
|
||||
readDir func(string) ([]fs.DirEntry, error)
|
||||
}
|
||||
|
||||
// SetBasePath sets the base path for the template
|
||||
@@ -14,3 +17,7 @@ func (c *Context) SetBasePath(path string) {
|
||||
func (c *Context) SetReadFile(f func(string) ([]byte, error)) {
|
||||
c.readFile = f
|
||||
}
|
||||
|
||||
func (c *Context) SetReadDir(f func(string) ([]fs.DirEntry, error)) {
|
||||
c.readDir = f
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user