Comments (16)
It would be hard to give a yes or no depending on just the directory structure - the contents of the files matters too. I would suggest opening a draft PR with the work, and we can iterate and make the appropriate changes :)
from checkpointctl.
@shikharish it would mainly require creating a cmd
package and moving the commands into individual files under that package, i.e. the show()
and setupShow()
functions would go in show.go
, similarly with inspect.go
, and the remaining functions under util.go
. This package can be imported in the existing checkpointctl.go
file and used in the main function.
from checkpointctl.
I can't use the functions from
controller.go
andmemparse.go
(which are in themain
package) incmd
package.
Ah, I assumed you were asking about whether those files should be split up into smaller components. Yes, the files should be moved, but not into cmd
. Placing them in the existing lib
package is more appropriate.
from checkpointctl.
Hello @snprajwal, what is the status of this issue? Can I work on this?
from checkpointctl.
This is not actively being worked on - do feel free to take it up!
from checkpointctl.
@snprajwal Thanks! Pls assign me this.
Also, can you pls explain the issue a bit more. What things should I keep in mind while refactoring?
from checkpointctl.
@snprajwal Should I also move container.go
and memparse.go
to cmd
pacakge as they will be used in show.go
, inspect.go
and utils.go
.
from checkpointctl.
IMO, it would be better to leave those files as is for now. If necessary, they can be split up in a separate PR going forward.
from checkpointctl.
IMO, it would be better to leave those files as is for now. If necessary, they can be split up in a separate PR going forward.
@snprajwal I mean I can't use the functions from controller.go
and memparse.go
(which are in the main
package) in cmd
package. Because we cannot import the main
package as far as I know.
from checkpointctl.
About lib/
. That is currently included in a couple of projects and basically has no external dependencies. This is a bit unfortunate that the lib/
namespace is blocked, but I just wanted to highlight that it needs to be in a different directory so that projects including lib/metadata.go
do not get additional dependencies pulled in.
from checkpointctl.
In that case, how about internal
? These files shouldn't be accessed by an external entity as a dependency anyway, it's purely for use within checkpointctl
from checkpointctl.
In that case, how about
internal
? These files shouldn't be accessed by an external entity as a dependency anyway, it's purely for use within checkpointctl
That should work. internal/
is a special name if I remember correctly and cannot be included in other projects, right? But if that will be a problem it can be renamed.
from checkpointctl.
Hello, am working on this. It is a bit more complicated then I expected it to be. A lot of files have to moved and changed. Would need some more time. This is the directory structure right now:
cmd
├── inspect.go
├── memparse.go
└── show.go
internal
├── container.go
├── tree.go
├── utils.go
└── utils_test.go
lib
└── metadata.go
checkpointctl.go
Please review whether this is appropriate.
from checkpointctl.
from checkpointctl.
I agree. Open a PR and let's discuss your work there. Having the actual changes makes the discussion much easier.
from checkpointctl.
@snprajwal Opened a draft PR.
from checkpointctl.
Related Issues (20)
- Make command fails HOT 9
- Release 1.1.X+ to remove indirect dependency related to CVE-2024-21626 HOT 2
- Dead link to Podman checkpoint HOT 1
- Add support for checkpoint conversion for different container runtimes/engines HOT 3
- Doubt - Relation with Kubernetes HOT 2
- Versioning? HOT 5
- Showing env and mounts HOT 2
- Do not unpack the whole checkpoint archive HOT 4
- Extend checkpointctl to convert checkpoint archives to OCI images HOT 2
- Add support for showing information for multiple checkpoints HOT 7
- Add support for list command HOT 7
- Do not use the podman network status HOT 2
- Add integration test with podman HOT 3
- Process tree output looks not totally correct. HOT 7
- Extend the output format with a tree view HOT 1
- Extend `inspect` output format with JSON HOT 3
- Update `README.md`
- Prune process tree by PID if specified
- Statisitics output adds `us` everywhere
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from checkpointctl.