extractConstructorArgs returns the list of argument metadata for a given function type.
(fnType reflect.Type)
| 142 | |
| 143 | // extractConstructorArgs returns the list of argument metadata for a given function type. |
| 144 | func 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 | } |