Missing context readDir, required for any template using readDir* functions
Signed-off-by: Arkaitz Jimenez <arkaitzj@gmail.com>
This commit is contained in:
parent
824f7ba2b2
commit
684be0af50
|
|
@ -19,6 +19,7 @@ func NewFileRenderer(readFile func(filename string) ([]byte, error), basePath st
|
|||
Context: &Context{
|
||||
basePath: basePath,
|
||||
readFile: readFile,
|
||||
readDir: os.ReadDir,
|
||||
},
|
||||
Data: data,
|
||||
}
|
||||
|
|
@ -31,6 +32,7 @@ func NewFirstPassRenderer(basePath string, data interface{}) *FileRenderer {
|
|||
preRender: true,
|
||||
basePath: basePath,
|
||||
readFile: os.ReadFile,
|
||||
readDir: os.ReadDir,
|
||||
},
|
||||
Data: data,
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue