ci(gci/import): improve golangci.yml and add gci linter (#4010)

This commit is contained in:
houseme
2024-12-07 14:17:33 +08:00
committed by GitHub
parent 2066aa4803
commit b0b84a3937
182 changed files with 436 additions and 314 deletions

View File

@ -28,10 +28,8 @@ const (
stackFilterKeyLocal = "/errors/gerror/gerror"
)
var (
// goRootForFilter is used for stack filtering in development environment purpose.
goRootForFilter = runtime.GOROOT()
)
// goRootForFilter is used for stack filtering in development environment purpose.
var goRootForFilter = runtime.GOROOT()
func init() {
if goRootForFilter != "" {

View File

@ -101,7 +101,7 @@ func filterLinesOfStackInfos(infos []*stackInfo) {
// formatStackInfos formats and returns error stack information as string.
func formatStackInfos(infos []*stackInfo) string {
var buffer = bytes.NewBuffer(nil)
buffer := bytes.NewBuffer(nil)
for i, info := range infos {
buffer.WriteString(fmt.Sprintf("%d. %s\n", i+1, info.Message))
if info.Lines != nil && info.Lines.Len() > 0 {