Skip to content
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

convert into cli #2

Closed
gaurav-gogia opened this issue Sep 30, 2019 · 7 comments
Closed

convert into cli #2

gaurav-gogia opened this issue Sep 30, 2019 · 7 comments
Labels
enhancement New feature or request hacktoberfest

Comments

@gaurav-gogia
Copy link
Owner

Each folder has its own main package file. I was wondering if a simple CLI added for each so that they could be run more easily. More details can be discussed in this thread.

I get that my above description is a bit vague but its just that I couldn't find better words. I'll try my best to answer your queries though

@gaurav-gogia gaurav-gogia added hacktoberfest enhancement New feature or request labels Sep 30, 2019
@ibraimgm
Copy link
Contributor

ibraimgm commented Oct 1, 2019

Do you prefer (1) one binary per folder or (2) a single cli that allows access to all tools?

Personally, I think a single cli with all commands works best, we can have something like:

$ dfis hash myfile.txt
MD5: ACBD18DB4CC2F85CEDEF654FCCC4A4D8 # same as crypto-utils/hash-big.go

$ dfis hash --all myfile.txt # same as crypto-utils/hash-small.go
MD5: ACBD18DB4CC2F85CEDEF654FCCC4A4D8
SHA1: ...
SHA256: ...
SHA512: ...

$ dfis info myfile.txt # same as file-utils/file-info.go
.... you get the idea ...

If this is what you want, I can work on it using a library that I recently wrote just for this kind of scenario.

@ibraimgm
Copy link
Contributor

ibraimgm commented Oct 1, 2019

Also, as an unrelated note, I can convert this project to go modules if you want.

@gaurav-gogia
Copy link
Owner Author

Hey!

Yea, second option sounds better. I didn't want to go for it because it felt a bit too complex but if we can make it happen then that would be awesome.

Also, yes go modules will be cool too. I don't know why but I keep running into weird errors like "this file is not a part of X package" while it actually is when I try using go modules.

@ibraimgm
Copy link
Contributor

ibraimgm commented Oct 1, 2019

Done, take a look at PR #10 and see if it is good enough. If/when it is approved, I will start the main cli application.

Also, I added Issue #11.

@gaurav-gogia
Copy link
Owner Author

That was fast! Alright, will look into it and update you :)

@ibraimgm
Copy link
Contributor

ibraimgm commented Oct 4, 2019

@gaurav-gogia , check PR #15 to see if it is acceptable or if you have any other suggestions.

@gaurav-gogia
Copy link
Owner Author

Sure, will look into it now :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request hacktoberfest
Projects
None yet
Development

No branches or pull requests

2 participants