MCPcopy
hub / github.com/kubernetes/code-generator / Register

Method Register

cmd/validation-gen/testscheme/testscheme.go:87–94  ·  view source on GitHub ↗

Register adds a scheme setup function to the list.

(funcs ...func(*Scheme) error)

Source from the content-addressed store, hash-verified

85
86// Register adds a scheme setup function to the list.
87func (s *Scheme) Register(funcs ...func(*Scheme) error) {
88 for _, f := range funcs {
89 err := f(s)
90 if err != nil {
91 s.registrationErrors = append(s.registrationErrors, toRegistrationError(err))
92 }
93 }
94}
95
96func toRegistrationError(err error) *field.Error {
97 return field.InternalError(nil, fmt.Errorf("registration error: %w", err))

Callers 15

initFunction · 0.80
initFunction · 0.80
initFunction · 0.80
initFunction · 0.80
initFunction · 0.80
initFunction · 0.80
initFunction · 0.80
initFunction · 0.80
initFunction · 0.80
initFunction · 0.80
initFunction · 0.80
initFunction · 0.80

Calls 1

toRegistrationErrorFunction · 0.85

Tested by

no test coverage detected