]> Sergey Matveev's repositories - mmc.git/commitdiff
strings.SplitSeq master
authorSergey Matveev <stargrave@stargrave.org>
Sun, 13 Jul 2025 07:25:46 +0000 (10:25 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Sun, 13 Jul 2025 07:25:46 +0000 (10:25 +0300)
cmd/mmc/post.go

index 660618f6375b4db1821b31b5e5a39cab1f71caf3..e3be752edeebd08bbd86159a1415b4ee09a1fc25 100644 (file)
@@ -134,7 +134,7 @@ func makePost(c *model.Client4, chId, text string) (*model.Post, error) {
        }
        post := &model.Post{ChannelId: chId}
        var lines []string
-       for _, line := range strings.Split(text, "\n") {
+       for line := range strings.SplitSeq(text, "\n") {
                if !strings.HasPrefix(line, CmdFile) {
                        lines = append(lines, line)
                        continue