Skip to content

Commit

Permalink
ci: fix the importas rule configuration
Browse files Browse the repository at this point in the history
Also fix the reported issue.
  • Loading branch information
ccoVeille committed Dec 13, 2024
1 parent 6b11ba3 commit 5563d1e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ linters:
linters-settings:
importas:
alias:
# prevent conflicts with std packages
- pkg: github.com/go-sprout/sprout/registry/(\w+)
alias: r$1
# prevent conflicts with first level std packages
- pkg: "[a-z][0-9a-z]+"
alias: ""

gofumpt:
module-path: github.com/go-sprout/sprout
misspell:
Expand Down
4 changes: 2 additions & 2 deletions handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package sprout
import (
"log/slog"
"slices"
gostrings "strings"
"strings"

"golang.org/x/text/cases"
"golang.org/x/text/language"
Expand Down Expand Up @@ -259,7 +259,7 @@ func safeFuncName(name string) string {
return ""
}

var b gostrings.Builder
var b strings.Builder
b.Grow(len(name) + 4)

b.WriteString("safe")
Expand Down

0 comments on commit 5563d1e

Please # to comment.