From 52d650d76d51974c5a893a1b620ec342d808f8e3 Mon Sep 17 00:00:00 2001 From: Emile Date: Sat, 2 Nov 2019 21:15:42 +0100 Subject: create channels --- src/channel.go | 24 ++++++++++++++++++++++++ src/go.mod | 2 ++ src/go.sum | 2 ++ 3 files changed, 28 insertions(+) create mode 100644 src/channel.go create mode 100644 src/go.sum (limited to 'src') diff --git a/src/channel.go b/src/channel.go new file mode 100644 index 0000000..11a6257 --- /dev/null +++ b/src/channel.go @@ -0,0 +1,24 @@ +package main + +import "log" + +// registerChannels creats some channels, stores them in a channels struct and returns the struct for futher usage +func registerChannels() channels { + 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, + } + + log.Printf("%s Done defining channels", boldGreen("[+]")) + + return channels +} diff --git a/src/go.mod b/src/go.mod index 9fe6823..39c531c 100644 --- a/src/go.mod +++ b/src/go.mod @@ -1,3 +1,5 @@ module git.darknebu.la/emile/gofuzz/src go 1.13 + +require github.com/gorilla/mux v1.7.3 diff --git a/src/go.sum b/src/go.sum new file mode 100644 index 0000000..2bf9262 --- /dev/null +++ b/src/go.sum @@ -0,0 +1,2 @@ +github.com/gorilla/mux v1.7.3 h1:gnP5JzjVOuiZD07fKKToCAOjS0yOpj/qPETTXCCS6hw= +github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -- cgit 1.4.1