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

feat: Save output to file #30

Closed

Conversation

AlirezaKhadem
Copy link

No description provided.

@AlirezaKhadem
Copy link
Author

related to this feature request: #27

}

if _, err := os.Stat(filepath.Join(fullPath, filename)); os.IsNotExist(err) {
file, err := os.Create(filepath.Join(fullPath, filename))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's better if we don't left any err unchecked.

@@ -43,3 +54,62 @@ func findAndShowResult(username, site string) {
os.Exit(1)
}
}

func writeOutput(m *model, outputPath string, filename string, printFound bool) error {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a nitpicking, But I would prefer to have these file related functions in a separate file.

@TheYahya
Copy link
Owner

TheYahya commented Jan 5, 2024

Hey @AlirezaKhadem, Nice work. Thanks for the PR.

I would prefer to have the -o flag to be exactly name of the output file. Currently if I run enola theyahya -o output.txt it will generate a output.txt directory with a theyahya file inside it. I would prefer to just have output.txt file with the results.

@TheYahya
Copy link
Owner

TheYahya commented Sep 9, 2024

Hi @AlirezaKhadem Jan,
Closing, since you haven't fixed the issues, and #32 is already merged.

@TheYahya TheYahya closed this Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants