diff --git a/README.md b/README.md index f37cc46..4d7b585 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ You can download the pre-built binaries from the [releases](https://github.com/u urlhunter requires 3 parameters to run: `-keywords`, `-date` and `-o`. -For example: `urlhunter -keywords keywords.txt -date 2020-11-20 -o out.txt` +For example: `urlhunter --keywords keywords.txt --date 2020-11-20 --o out.txt` ### --keywords diff --git a/main.go b/main.go index 0a8a0d5..ac11892 100644 --- a/main.go +++ b/main.go @@ -63,7 +63,6 @@ var err error var archivesPath string func main() { - var keywordFile string var dateParam string var outFile string @@ -227,7 +226,6 @@ func getArchive(body []byte, date string, keywordFile string, outfile string) { } func searchFile(fileLocation string, keyword string, outfile string) { - var path string if strings.HasPrefix(fileLocation, "archives") { @@ -384,20 +382,6 @@ func downloadFile(url string) { color.Green("Download Finished!") } -func ByteCountSI(b int64) string { - const unit = 1000 - if b < unit { - return fmt.Sprintf("%d B", b) - } - div, exp := int64(unit), 0 - for n := b / unit; n >= unit; n /= unit { - div *= unit - exp++ - } - return fmt.Sprintf("%.1f %cB", - float64(b)/float64(div), "kMGTPE"[exp]) -} - func Unzip(src string, dest string) ([]string, error) { var filenames []string r, err := zip.OpenReader(src)