-
Notifications
You must be signed in to change notification settings - Fork 35
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Save output to file #30
base: main
Are you sure you want to change the base?
feat: Save output to file #30
Conversation
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)) |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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.
Hey @AlirezaKhadem, Nice work. Thanks for the PR. I would prefer to have the |
No description provided.