WithContext passes context to all functions calls with a context.Context argument.
(name string)
| 195 | |
| 196 | // WithContext passes context to all functions calls with a context.Context argument. |
| 197 | func WithContext(name string) Option { |
| 198 | return func(c *conf.Config) { |
| 199 | c.Visitors = append(c.Visitors, patcher.WithContext{ |
| 200 | Name: name, |
| 201 | Functions: c.Functions, |
| 202 | Env: &c.Env, |
| 203 | NtCache: &c.NtCache, |
| 204 | }) |
| 205 | } |
| 206 | } |
| 207 | |
| 208 | // Timezone sets default timezone for date() and now() builtin functions. |
| 209 | func Timezone(name string) Option { |
no outgoing calls
searching dependent graphs…