mirror of
https://gitee.com/johng/gf
synced 2026-06-07 02:12:11 +08:00
ci(gci/import): improve golangci.yml and add gci linter (#4010)
This commit is contained in:
@ -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 != "" {
|
||||
|
||||
@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user