File tree Expand file tree Collapse file tree 3 files changed +27
-3
lines changed
goformatters/gci/internal Expand file tree Collapse file tree 3 files changed +27
-3
lines changed Original file line number Diff line number Diff line change 88
99 "github.com/daixiang0/gci/pkg/config"
1010 "github.com/daixiang0/gci/pkg/section"
11+ sectioni "github.com/golangci/golangci-lint/pkg/goformatters/gci/internal/section"
1112)
1213
1314var defaultOrder = map [string ]int {
@@ -39,12 +40,12 @@ type YamlConfig struct {
3940func (g YamlConfig ) Parse () (* Config , error ) {
4041 var err error
4142
42- sections , err := section .Parse (g .SectionStrings )
43+ sections , err := sectioni .Parse (g .SectionStrings )
4344 if err != nil {
4445 return nil , err
4546 }
4647 if sections == nil {
47- sections = section .DefaultSections ()
48+ sections = sectioni .DefaultSections ()
4849 }
4950 if err := configureSections (sections , g .ModPath ); err != nil {
5051 return nil , err
@@ -63,7 +64,7 @@ func (g YamlConfig) Parse() (*Config, error) {
6364 })
6465 }
6566
66- sectionSeparators , err := section .Parse (g .SectionSeparatorStrings )
67+ sectionSeparators , err := sectioni .Parse (g .SectionSeparatorStrings )
6768 if err != nil {
6869 return nil , err
6970 }
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