added new function that prints interface arrays

This commit is contained in:
Nils Stinnesbeck 2020-10-14 12:59:22 +02:00
parent 3d808501fd
commit a2031d2e0c
Signed by: nils
GPG Key ID: 86D4882C6C6CA48B

View File

@ -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])
}
}