blob: fbe31909127335561ffa09334aecb14b17898eaa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
package main
import "log"
// registerChannels creats some channels, stores them in a channels struct and returns the struct for futher usage
func registerChannels() channels {
if verbose == true {
log.Printf("%s Defining channels", green("[i]"))
}
// define the channels
wordlistChannel := make(chan string)
printChannel := make(chan Response)
doneChannel := make(chan int)
// define a channels struct containing the channels
channels := channels{
wordlistChannel: wordlistChannel,
printChannel: printChannel,
doneChannel: doneChannel,
}
if verbose == true {
log.Printf("%s Done defining channels", boldGreen("[+]"))
}
return channels
}
|