MCPcopy Create free account
hub / github.com/codnect/procyon / extractConstructorArgs

Function extractConstructorArgs

component/constructor.go:144–156  ·  view source on GitHub ↗

extractConstructorArgs returns the list of argument metadata for a given function type.

(fnType reflect.Type)

Source from the content-addressed store, hash-verified

142
143// extractConstructorArgs returns the list of argument metadata for a given function type.
144func extractConstructorArgs(fnType reflect.Type) []Arg {
145 numIn := fnType.NumIn()
146 args := make([]Arg, 0, numIn)
147
148 for index := 0; index < numIn; index++ {
149 args = append(args, Arg{
150 index: index,
151 typ: fnType.In(index),
152 })
153 }
154
155 return args
156}

Callers 1

createConstructorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected