From: Sergey Matveev Date: Fri, 29 May 2020 12:32:35 +0000 (+0300) Subject: Remove leading empty lines X-Git-Tag: v0.6.3^0 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=6b3dbfabbea052c7a70831703a08df7b7c929684;p=sgblog.git Remove leading empty lines --- diff --git a/cmd/sgblog-comment-add/main.go b/cmd/sgblog-comment-add/main.go index 719431b..31b3d01 100644 --- a/cmd/sgblog-comment-add/main.go +++ b/cmd/sgblog-comment-add/main.go @@ -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] } diff --git a/common.go b/common.go index 3fa5cec..57419d0 100644 --- 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" )