File tree 3 files changed +27
-3
lines changed
goformatters/gci/internal
3 files changed +27
-3
lines changed Original file line number Diff line number Diff line change 8
8
9
9
"github.com/daixiang0/gci/pkg/config"
10
10
"github.com/daixiang0/gci/pkg/section"
11
+ sectioni "github.com/golangci/golangci-lint/pkg/goformatters/gci/internal/section"
11
12
)
12
13
13
14
var defaultOrder = map [string ]int {
@@ -39,12 +40,12 @@ type YamlConfig struct {
39
40
func (g YamlConfig ) Parse () (* Config , error ) {
40
41
var err error
41
42
42
- sections , err := section .Parse (g .SectionStrings )
43
+ sections , err := sectioni .Parse (g .SectionStrings )
43
44
if err != nil {
44
45
return nil , err
45
46
}
46
47
if sections == nil {
47
- sections = section .DefaultSections ()
48
+ sections = sectioni .DefaultSections ()
48
49
}
49
50
if err := configureSections (sections , g .ModPath ); err != nil {
50
51
return nil , err
@@ -63,7 +64,7 @@ func (g YamlConfig) Parse() (*Config, error) {
63
64
})
64
65
}
65
66
66
- sectionSeparators , err := section .Parse (g .SectionSeparatorStrings )
67
+ sectionSeparators , err := sectioni .Parse (g .SectionSeparatorStrings )
67
68
if err != nil {
68
69
return nil , err
69
70
}
Original file line number Diff line number Diff line change
1
+ package section
2
+
3
+ import "github.com/daixiang0/gci/pkg/section"
4
+
5
+ func DefaultSections () section.SectionList {
6
+ return section.SectionList {Standard {}, section.Default {}}
7
+ }
Original file line number Diff line number Diff line change
1
+ //go:build go1.24
2
+
3
+ //golangcitest:args -Egci
4
+ //golangcitest:expected_exitcode 0
5
+ package testdata
6
+
7
+ import (
8
+ "crypto/sha3"
9
+ "errors"
10
+ "fmt"
11
+ )
12
+
13
+ func _ () {
14
+ fmt .Print (errors .New ("x" ))
15
+ sha3 .New224 ()
16
+ }
You can’t perform that action at this time.
0 commit comments