-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
libgopar #6
Comments
Yeah, I'm open to this, but first I'd like to ask what the use case of this would be. Is the intent to replicate the command-line app exactly in some other form? If so, then a single I'd imagine if it were to integrate it in some other app, then each high-level function (create, verify, repair, etc.) would be a single function in a package, and all the flags would be replaced with On the other hand, if the par stuff is meant to be one command in a bigger command-line app (like how So yeah, it all depends on what you ultimately want to do. :) |
I forked libpar2cmdline and added a I imagine you'd like to support not just my application, hence the question :) |
Yeah, having separate functions for the major operations would be the way I'd do it, I think. For example, Create would look like |
The second thing I'd like to do is make gopar suitable for use as a library. By that I don't mean all the primitives it contains, but (also?) the interface through
main()
. The fastest way to to it would be to turnmain()
intopar(args []string)
, and havemain()
call it. However I'm certain you would prefer a break up into separatecreate()
,verify()
andrepair()
functions :) In which case, the flagsetting part of main needs to be duplicated. Copy paste or is there a cleaner way? With my C++/Python hat on, I think of hiding all that in a class, but that doesn't seem to be the Go way so I ask./cmd
? Maybe just the root?The text was updated successfully, but these errors were encountered: