Refactor helpers/container/service pkg
The following discussions from !1680 (merged) should be addressed:
-
@steveazz started a discussion: Let's follow the Go practice using
camleCase
referenceRegexpNoPort := regexp.MustCompile(`^(.*?)(|:[0-9]+)(|/.*)```suggestion:-0+0 )
-
@steveazz started a discussion: Named returns are sometimes hard to debug/understand and maintain, also it's suggested to avoid them for large functions. Can we try and remove this?
Having a function parse strings with regex and doing manipulation is not always straight forward. I think we should add a comment to this explaining that it will transform an example string into some struct. For example:
Prase `golang:1.13` into a struct .....
-
@steveazz started a discussion: Should this be a constant instead?