Replace ASCII tree drawing with Unicode symbols

This commit is contained in:
maride 2019-12-09 12:15:36 +01:00
parent f0b5ab140e
commit 29aba89b6a

View File

@ -24,9 +24,9 @@ func GenerateTree(strarr []string) string {
for iter, elem := range strarr { for iter, elem := range strarr {
// check if we got the last element // check if we got the last element
if iter < len(strarr) - 1 { if iter < len(strarr) - 1 {
tmpstr = fmt.Sprintf("%s|- %s\n", tmpstr, elem) tmpstr = fmt.Sprintf("%s %s\n", tmpstr, elem)
} else { } else {
tmpstr = fmt.Sprintf( "%s'- %s\n", tmpstr, elem) tmpstr = fmt.Sprintf( "%s %s\n", tmpstr, elem)
} }
} }