diff options
author | Emile <hanemile@protonmail.com> | 2019-11-01 19:16:58 +0100 |
---|---|---|
committer | Emile <hanemile@protonmail.com> | 2019-11-01 19:16:58 +0100 |
commit | b9264d1b8c3c007368a970015c4366fa5eefde7e (patch) | |
tree | 0fc6035287ec809fab1d2b8590146287f11e8845 /src/wordlist.go | |
parent | a6ccee210537232664b3cf98e7600909d7076e8d (diff) |
writing the wordlist into the wordlistChannel function
Diffstat (limited to 'src/wordlist.go')
-rw-r--r-- | src/wordlist.go | 9 |
1 files changed, 9 insertions, 0 deletions
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 + } + }() +} |