]> Sergey Matveev's repositories - sgblog.git/commitdiff
Remove leading empty lines v0.6.3
authorSergey Matveev <stargrave@stargrave.org>
Fri, 29 May 2020 12:32:35 +0000 (15:32 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Fri, 29 May 2020 12:32:35 +0000 (15:32 +0300)
cmd/sgblog-comment-add/main.go
common.go

index 719431b37318c1576402c7528531e14b50d7fbdf..31b3d01a377781cc3e8e4383a3057c943fdb432b 100644 (file)
@@ -114,6 +114,9 @@ func main() {
                line = strings.TrimRight(line, " \r")
                lines[i] = line
        }
+       for lines[0] == "" {
+               lines = lines[1:]
+       }
        for lines[len(lines)-1] == "" {
                lines = lines[:len(lines)-1]
        }
index 3fa5cec2cb35d61dc28fe02a783e09d023354982..57419d0d0301a47b5b8e1d7265e1964ea879b170 100644 (file)
--- a/common.go
+++ b/common.go
@@ -2,6 +2,6 @@
 package sgblog
 
 const (
-       Version = "0.6.2"
+       Version = "0.6.3"
        WhenFmt = "2006-01-02 15:04:05Z07:00"
 )