From 62dd4968d31225b32e8d6ae83c4f2830c88da6df Mon Sep 17 00:00:00 2001 From: Emile Date: Sat, 2 Nov 2019 21:13:18 +0100 Subject: using the channels struct insead of reaching in every channel per hand --- src/printer.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/printer.go') 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 -- cgit 1.4.1