From b9264d1b8c3c007368a970015c4366fa5eefde7e Mon Sep 17 00:00:00 2001 From: Emile Date: Fri, 1 Nov 2019 19:16:58 +0100 Subject: writing the wordlist into the wordlistChannel function --- src/wordlist.go | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/wordlist.go') diff --git a/src/wordlist.go b/src/wordlist.go index 76df5f4..5841c47 100644 --- a/src/wordlist.go +++ b/src/wordlist.go @@ -24,3 +24,12 @@ func readWordlist(wordlistPath string) ([]string, error) { // return the lines, the line count and no error return lines, nil } + +func writeWordlistToChannel(wordlistChannel chan string, wordlist []string) { + // write all the words from the wordlist into the wordlistChannel + go func() { + for _, line := range wordlist { + wordlistChannel <- line + } + }() +} -- cgit 1.4.1