You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Each of these packages rename the existing FooTask into a Task structure, making the code a little less verbose or more familiar across sub-packages, as in:
t1:=nested.New("foo", nested.Options{})
t2:=shell.New("bar", "kubectl", "get", "pods")`
t3 := callback.New("quux", someFunc)
By doing so we remove the need to use prefixes for each type, and it gives more isolation between definitions, code, and tests.
I believe this should be done first before my other proposal in #6.
What do you think?
The text was updated successfully, but these errors were encountered:
Heya. I've been looking at this with more detail, and I'd like to propose a new package layout that I think it will make things easier to maintain.
At the top level we have the current import path,
github.com/mplzik/rnr/golang/pkg/rnr
, which contains theTask
interface and theJob
struct.Then we have
github.com/mplzik/rnr/golang/pkg/rnr/tasks/web
with theServer
struct for what it currently resides inwebserver.go
.Last but not least, we have for each type of class, the following:
github.com/mplzik/rnr/golang/pkg/rnr/tasks/nested
github.com/mplzik/rnr/golang/pkg/rnr/tasks/shell
github.com/mplzik/rnr/golang/pkg/rnr/tasks/callback
Each of these packages rename the existing
FooTask
into aTask
structure, making the code a little less verbose or more familiar across sub-packages, as in:By doing so we remove the need to use prefixes for each type, and it gives more isolation between definitions, code, and tests.
I believe this should be done first before my other proposal in #6.
What do you think?
The text was updated successfully, but these errors were encountered: