String2slice replaces "\n"

This commit is contained in:
Klaus Wendel, archium GmbH 2021-06-15 14:38:08 +02:00
parent 7be81258d1
commit 6aec64c7fc
1 changed files with 1 additions and 0 deletions

View File

@ -67,6 +67,7 @@ func String2args(s string) (ss []string) {
//String2slice macht aus einer mit Kommas oder Leerzeichen getrennten Liste ein Slice
func String2slice(s string) (ss []string) {
s = strings.ReplaceAll(s, ",", " ")
s = strings.ReplaceAll(s, "\n", " ")
sst := strings.Split(s, " ")
for _, v := range sst {