AddNested adds the invalid parameter errors from another InvalidParamsError value into this collection. The nested errors will have their nested context updated and base context to reflect the merging. Use for nested validations errors.
(nestedCtx string, nested InvalidParamsError)
| 28 | // |
| 29 | // Use for nested validations errors. |
| 30 | func (e *InvalidParamsError) AddNested(nestedCtx string, nested InvalidParamsError) { |
| 31 | for _, err := range nested.errs { |
| 32 | err.SetContext(e.Context) |
| 33 | err.AddNestedContext(nestedCtx) |
| 34 | e.errs = append(e.errs, err) |
| 35 | } |
| 36 | } |
| 37 | |
| 38 | // Len returns the number of invalid parameter errors |
| 39 | func (e *InvalidParamsError) Len() int { |
nothing calls this directly
no test coverage detected