Refactor the apparmor flagging process#1774
Conversation
c258a69 to
ba8fb46
Compare
|
Thanks, this one is easily reviewable 👍 |
|
I wonder if we should put |
I don't think creating a sub-package (
Why these entry point functions need to be in |
| "text/template" | ||
|
|
||
| types "github.com/containerd/nerdctl/pkg/api/types/apparmor" | ||
| "github.com/containerd/nerdctl/pkg/apparmorutil" |
There was a problem hiding this comment.
Just a question, no action requested :) :
I wonder, while we move backend logic into pkg side, should we also gradually collocate those backend logic and the specific util package into one package? Take apparmor as an example:
- we will have
pkg/cmd/apparmor(or anypkg/.../apparmordecieded) for the backend logic. - we have
pkg/apparmorutilfor main functions related toapparmor.
I guess most functions in pkg/cmd/apparmor will be just take and (post)process some ApparmorOption fields and then call a function in pkg/apparmorutil.
There was a problem hiding this comment.
I think this xxutil should only contain some pure helper function. The most important logic shouble be completed in the pkg/xxx/{cmd}
We still need a package to collect the |
I still think we need some subpackage in |
Not necessarily one file, but organize by subpackage seems adding too much hierarchy. We can still split those
|
I prefer multi-level package. But you are right, keeping the flatten style with So I think we reach one point
|
|
And the second problem, |
Happy to see things going ahead 😀. I propose to stay in the Middle, So we keep the flat package as @djdongjin said and Split by So we :
|
8861162 to
c799abb
Compare
09f6feb to
18bbd36
Compare
|
Could you consider splitting the fmtutil commit |
This PR should be merged after #1779 |
18bbd36 to
57d364e
Compare
|
#1779 has been merged, I think this PR is ok to merge |
Signed-off-by: Zheao.Li <me@manjusaka.me>
57d364e to
606261d
Compare
CheckList:
pkg/api/types/${cmd}.go, and define the CommandOption for this commandpkg/cmd/${cmd}, and move the command entry point in real into this packageSigned-off-by: Zheao.Li me@manjusaka.me