Factor boilerplate methods out of modules
claudijd opened this issue · 5 comments
Example: startCounters
@claudijd What defines method as boilerplate ?
@vbmade2000 it's been 6+ months since I filed this. I'll take a closer look and try and remember what I was thinking.
@vbmade2000 I went back and looked through to try and understand what I was thinking, and I realized now that issue doesn't quite capture the context of what I was thinking at the time. Here's attempt 2...
Both /modules/pkg/pkg.go and modules/scribe/scribe.go both define two methods (startCounters and endCounters) that basically do the same thing in each module. My thought at the time was maybe we could either refactor these two out into a module timing lib, so it could be testing independently and then inherited into any module that needed counting.
That said, I'm not an experienced Go programmer, so I defer to @ameihm0912 or @jvehent 's good judgement on whether this is something they want to do. I'll admit right now it doesn't seem like an important issue, I just happened to notice the duplicated code and filed this issue during a training session @ameihm0912 was presenting on how to write modules.
@claudijd Sure. No probs. Actually I have planned to contribute actively in Mig and so going through issues.