diff options
| author | Nikolaus Gotsche <n@softwarefools.com> | 2018-10-26 01:23:24 +0200 |
|---|---|---|
| committer | Nikolaus Gotsche <n@softwarefools.com> | 2018-10-26 01:23:24 +0200 |
| commit | 1312d9dc80d3c43fce59e41ca3798abafd67e5f3 (patch) | |
| tree | e5a0b075c7cf41f3dd9235009dd3202cd61f39bd /utils.go | |
| parent | 25e12980c0448cb58e545fffa137905fd861dea3 (diff) | |
Colorprompt saved
Diffstat (limited to 'utils.go')
| -rw-r--r-- | utils.go | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -139,10 +139,16 @@ func checkErr(err error) { } //make One String with Linebreaks out of an input String Array -func strLines(in []string) (out string) { - out = "" +func StrLines(in []string,border string) (out string) { + i := 0 for _, s := range in { - out = fmt.Sprintf("%s%s\n", out, s) + neu := "" + if i>0 { + neu = "\n" + } + neu = neu + fmt.Sprintf("%s%s", border, s) + out = out + neu + i++ } return } |
