about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorEmile <hanemile@protonmail.com>2019-11-02 21:13:18 +0100
committerEmile <hanemile@protonmail.com>2019-11-02 21:13:18 +0100
commit62dd4968d31225b32e8d6ae83c4f2830c88da6df (patch)
tree9eb750507a2602beb77f94ee152aba560f4bddae /src
parent6809acb6c651d12dc348f1089dc630aeb9be0866 (diff)
using the channels struct insead of reaching in every channel per hand
Diffstat (limited to 'src')
-rw-r--r--src/printer.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/printer.go b/src/printer.go
index bb9ea63..83268bc 100644
--- a/src/printer.go
+++ b/src/printer.go
@@ -5,11 +5,12 @@ import (
 	"log"
 )
 
-func printResponses(printChannel chan Response) {
+// printResponse reads a response from the printChannel, formats it and prints it
+func printResponses(channels channels) {
 	var i int
 	for {
 		// read a response from the printChannel for further usage
-		response := <-printChannel
+		response := <-channels.printChannel
 
 		// define a postfix: a string attached to the end of all printed
 		// string set in the section filtering the status code cases