Add method to Document to get the current environment
This commit is contained in:
parent
243659e9ee
commit
e6415a250b
@ -47,6 +47,11 @@ func (this *Document) Execute (output io.Writer, data ExecutionData) error {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Environment returns the environment this document is in.
|
||||||
|
func (this *Document) Environment () *Environment {
|
||||||
|
return this.environment
|
||||||
|
}
|
||||||
|
|
||||||
// ExecutionData is data made available to documents as they are being exeucted.
|
// ExecutionData is data made available to documents as they are being exeucted.
|
||||||
type ExecutionData struct {
|
type ExecutionData struct {
|
||||||
Data any // Custom data
|
Data any // Custom data
|
||||||
|
Loading…
Reference in New Issue
Block a user