func PrintArray(m interface{}) string {
	var outputText string
	switch reflect.TypeOf(m).Kind() {
	case reflect.Slice:
		var xs []string
		slice := reflect.ValueOf(m)
		for i := 0; i < slice.Len(); i++ {
			xs = append(xs, fmt.Sprintf("[%d]=%s", i, slice.Index(i)))
		}
		if len(xs) == 0 {
			outputText = "len(array) == 0"
		} else {
			outputText = strings.Join(xs, "\n")
		}
	default:
		outputText = fmt.Sprintf("error while printing array\nreceived a %T\n  %s\n", m, m)
	}
	return outputText
}
PrintArray prints an array
package utils
import (
	"fmt"
	"reflect"
	"sort"
	"strings"
)
func PrintMap(m interface{}) string {
	var outputText string
	v := reflect.ValueOf(m)
	if v.Kind() != reflect.Map {
		outputText = fmt.Sprintf("error while printing map\nreceived a %T\n  %s\n", m, m)
	} else {
		keys := v.MapKeys()
		var xs []string
		for _, k := range keys {
			xs = append(xs, fmt.Sprintf("[%s]=%s", k, v.MapIndex(k)))
		}
		sort.Strings(xs)
		if len(xs) == 0 {
			outputText = "len(map) == 0"
		} else {
			outputText = strings.Join(xs, "\n")
		}
	}
	return outputText
}