summaryrefslogtreecommitdiff
path: root/utils.go
diff options
context:
space:
mode:
authorNikolaus Gotsche <n@softwarefools.com>2018-10-26 01:23:24 +0200
committerNikolaus Gotsche <n@softwarefools.com>2018-10-26 01:23:24 +0200
commit1312d9dc80d3c43fce59e41ca3798abafd67e5f3 (patch)
treee5a0b075c7cf41f3dd9235009dd3202cd61f39bd /utils.go
parent25e12980c0448cb58e545fffa137905fd861dea3 (diff)
Colorprompt saved
Diffstat (limited to 'utils.go')
-rw-r--r--utils.go12
1 files changed, 9 insertions, 3 deletions
diff --git a/utils.go b/utils.go
index f35a5a4..c0f80bb 100644
--- a/utils.go
+++ b/utils.go
@@ -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
}