ipld / go-car

A content addressible archive utility
Other
145 stars 44 forks source link

Provide Package for cmd functions #523

Open lordshashank opened 1 month ago

lordshashank commented 1 month ago

We have various important functions in our car cli . We can provide these utilities in some go-package, as would be quite helpful to people working with car files and building products. We can create package with functions like extract, etc and use them in our cli.

rvagg commented 1 month ago

if you'd like to propose a refactoring that extracts useful functions then please do; I agree that there's a lot of useful functionality bundled up in the cmd package that could be separate—although they are mostly pretty specific to cmd so the utility package should probably be closely related to it, maybe within cmd/ somewhere?

willscott commented 1 month ago

@lordshashank you mentioned extract as a function you'd like factored out. Are there others you'd like to see callable in the same way?

lordshashank commented 1 month ago

Yeah so quite helpful features would be extract, root, verify, filter, inspect (returning report items if possible), and list. I mean if you are going for implementation, there would surely be many interdependent functionalities, maybe provide the important ones. For me use cases are these, maybe someone else have others.