From a2031d2e0c8e179bc048dbeb6dcc73df2cce3a91 Mon Sep 17 00:00:00 2001 From: Nils Jakobi Date: Wed, 14 Oct 2020 12:59:22 +0200 Subject: [PATCH] added new function that prints interface arrays --- main.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/main.go b/main.go index ead2ab1..2726c4e 100644 --- a/main.go +++ b/main.go @@ -27,3 +27,10 @@ func Print(body interface{}) { // Print out string to stdout fmt.Println(string(s)) } + +// PrintArray will beautify the output of an interface array (bodyArray) +func PrintArray(bodyArray []interface{}) { + for i := range bodyArray { + Print(bodyArray[i]) + } +}