From e2ad967c22ebf9bfa14fc05d7460fd46b4942364 Mon Sep 17 00:00:00 2001 From: Loong Date: Fri, 21 Oct 2022 21:25:49 +0800 Subject: [PATCH] fix bug and bump up to 1.19.2 Signed-off-by: Loong --- main.go | 2 +- pkg/gci/gci.go | 2 +- pkg/section/standard_list.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index 84dbf56..f9fc7da 100644 --- a/main.go +++ b/main.go @@ -6,7 +6,7 @@ import ( "github.com/daixiang0/gci/cmd/gci" ) -var version = "0.8.0" +var version = "0.8.1" func main() { e := gci.NewExecutor(version) diff --git a/pkg/gci/gci.go b/pkg/gci/gci.go index 2980e7d..8248866 100644 --- a/pkg/gci/gci.go +++ b/pkg/gci/gci.go @@ -140,7 +140,7 @@ func LoadFormatGoFile(file io.FileObj, cfg config.Config) (src, dist []byte, err } var head []byte - if src[headEnd-1] == '\t' { + if src[headEnd-1] == '\t' || src[headEnd-1] == utils.Linebreak { head = src[:headEnd] } else { // handle multiple import blocks diff --git a/pkg/section/standard_list.go b/pkg/section/standard_list.go index 95c0d22..62decfe 100644 --- a/pkg/section/standard_list.go +++ b/pkg/section/standard_list.go @@ -1,6 +1,6 @@ package section -// Code generated based on go1.19.1. DO NOT EDIT. +// Code generated based on go1.19.2. DO NOT EDIT. var standardPackages = map[string]struct{}{ "archive/tar": {},