diff options
author | Emile <hanemile@protonmail.com> | 2019-11-02 21:13:18 +0100 |
---|---|---|
committer | Emile <hanemile@protonmail.com> | 2019-11-02 21:13:18 +0100 |
commit | 62dd4968d31225b32e8d6ae83c4f2830c88da6df (patch) | |
tree | 9eb750507a2602beb77f94ee152aba560f4bddae | |
parent | 6809acb6c651d12dc348f1089dc630aeb9be0866 (diff) |
using the channels struct insead of reaching in every channel per hand
-rw-r--r-- | src/printer.go | 5 |
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 |