ISSUE: {{ .Now }}
Hello, I have a problem with .Now variable, it seems like its called once both for send-before and send-after giving so a non correct time output for send-after http hook.
Same applies to run commands, variables are all parsed when execution of the backup starts, reporting not update values for {{ .Now }} in this case
Anything inside a double curly bracket (go template) is generated just once, before reading the configuration. So it's actually the normal behaviour.
I do understand your use case though: I could regenerate a full configuration file on each command, but I'm not entirely sure that wouldn't break any existing configuration. I need to verify that first 🤔
Anything inside a double curly bracket (go template) is generated just once, before reading the configuration. So it's actually the normal behaviour.
I do understand your use case though: I could regenerate a full configuration file on each command, but I'm not entirely sure that wouldn't break any existing configuration. I need to verify that first 🤔
Thank you for replying, maybe this can be done using an option inside a profile? so only users putting in that profile this option will turn on the feature you said.
That would be one way of doing it safely, for sure.
This templating system is still confusing though and I'm thinking we should probably populate an environment variable before each step instead.
So we would use $NOW instead of {{ .Now }}
Yeah, it's not a bad idea. Unfortunately, I'm not an expert in Go. I wish I could have been more useful in this situation.