fix lapi context add to allow helpers
This commit is contained in:
parent
e4dcdd2572
commit
07e7323cb7
1 changed files with 4 additions and 0 deletions
|
@ -217,6 +217,10 @@ func NewLapiCmd() *cobra.Command {
|
|||
}
|
||||
|
||||
func AddContext(key string, values []string) error {
|
||||
if err := exprhelpers.Init(nil); err != nil {
|
||||
return fmt.Errorf(err.Error())
|
||||
}
|
||||
|
||||
if err := alertcontext.ValidateContextExpr(key, values); err != nil {
|
||||
return fmt.Errorf("invalid context configuration :%s", err)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue