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

Method AddNestedContext

validation.go:114–125  ·  view source on GitHub ↗

AddNestedContext prepends a context to the field's path.

(ctx string)

Source from the content-addressed store, hash-verified

112
113// AddNestedContext prepends a context to the field's path.
114func (e *invalidParamError) AddNestedContext(ctx string) {
115 if len(e.nestedContext) == 0 {
116 e.nestedContext = ctx
117 return
118 }
119 // Check if our nested context is an index into a slice or map
120 if e.nestedContext[:1] != "[" {
121 e.nestedContext = fmt.Sprintf("%s.%s", ctx, e.nestedContext)
122 return
123 }
124 e.nestedContext = ctx + e.nestedContext
125}
126
127// An ParamRequiredError represents an required parameter error.
128type ParamRequiredError struct {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected