added new function that prints interface arrays
This commit is contained in:
parent
3d808501fd
commit
a2031d2e0c
7
main.go
7
main.go
@ -27,3 +27,10 @@ func Print(body interface{}) {
|
|||||||
// Print out string to stdout
|
// Print out string to stdout
|
||||||
fmt.Println(string(s))
|
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])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user