Container sets the container for resolving variable names. Defaults to an empty container. If all references within an expression are relative to a protocol buffer package, then specifying a container of `google.type` would make it possible to write expressions such as `Expr{expression: 'a < b'}` i
(name string)
| 251 | // specifying a container of `google.type` would make it possible to write expressions such as |
| 252 | // `Expr{expression: 'a < b'}` instead of having to write `google.type.Expr{...}`. |
| 253 | func Container(name string) EnvOption { |
| 254 | return func(e *Env) (*Env, error) { |
| 255 | cont, err := e.Container.Extend(containers.Name(name)) |
| 256 | if err != nil { |
| 257 | return nil, err |
| 258 | } |
| 259 | e.Container = cont |
| 260 | return e, nil |
| 261 | } |
| 262 | } |
| 263 | |
| 264 | // Abbrevs configures a set of simple names as abbreviations for fully-qualified names. |
| 265 | // |