GetParamAsString returns the specified parameter value as string. Parameter values are resolved according to their types. For instance, if the parameter type is `Status`, the system error code is converted to the error message. Returns an empty string if the given parameter name is not found in even
(name string)
| 346 | // Returns an empty string if the given parameter name is not found |
| 347 | // in event parameters. |
| 348 | func (e *Event) GetParamAsString(name string) string { |
| 349 | par, err := e.Params.Get(name) |
| 350 | if err != nil { |
| 351 | return "" |
| 352 | } |
| 353 | return par.String() |
| 354 | } |
| 355 | |
| 356 | // GetFlagsAsSlice returns parameter flags as a slice of bitmask string values. |
| 357 | func (e *Event) GetFlagsAsSlice(name string) []string { |