diff options
author | Ben Morrison <ben@gbmor.dev> | 2020-04-03 03:03:52 -0400 |
---|---|---|
committer | Ben Morrison <ben@gbmor.dev> | 2020-04-03 03:03:52 -0400 |
commit | 28a165f1caaa71c3ec06bb8756a622dddbddf5bc (patch) | |
tree | a0d26c6ba3ca6c69420912b194371de1aad1a56c | |
parent | c8c80becf658693e4d5b4979c988e47beb9f5e11 (diff) | |
download | goofbot-28a165f1caaa71c3ec06bb8756a622dddbddf5bc.tar.gz |
not splitting usernames to insert zero-width space, but prepending usernames with it
-rw-r--r-- | main.go | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/main.go b/main.go index e92dfb5..5b8e0fb 100644 --- a/main.go +++ b/main.go @@ -163,16 +163,13 @@ func main() { split := strings.Split(bytestream.String(), "\n") var out bytes.Buffer + for i := 1; i < len(split); i++ { if split[i] == "" { continue } - tmp := split[i] - a := tmp[:2] - b := tmp[2:] - c := fmt.Sprintf("%s%s%s", a, ZWSP, b) - + c := fmt.Sprintf("%s%s", ZWSP, split[i]) out.WriteString(c + " ") } |