MCPcopy Create free account
hub / github.com/aws/smithy-go / AddNested

Method AddNested

validation.go:30–36  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

28//
29// Use for nested validations errors.
30func (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
39func (e *InvalidParamsError) Len() int {

Callers

nothing calls this directly

Calls 2

SetContextMethod · 0.65
AddNestedContextMethod · 0.65

Tested by

no test coverage detected