ForEachParam iterate all the parameters of a model also exploring the sub-parameters recursively.
(m Model, fn func(param *Param))
| 73 | |
| 74 | // ForEachParam iterate all the parameters of a model also exploring the sub-parameters recursively. |
| 75 | func ForEachParam(m Model, fn func(param *Param)) { |
| 76 | paramsTraversal{ |
| 77 | paramsFunc: fn, |
| 78 | modelsFunc: nil, |
| 79 | exploreSubModels: true, |
| 80 | }.walk(m) |
| 81 | } |
| 82 | |
| 83 | // ForEachParamStrict iterate all the parameters of a model without exploring the sub-models. |
| 84 | func ForEachParamStrict(m Model, fn func(param *Param)) { |