Upgrade to golangci/golangci-lint-action@v7 (#254) …and fix lint issues.
4 files changed, 10 insertions(+), 3 deletions(-)
M .github/workflows/ci.yml → .github/workflows/ci.yml
@@ -84,6 +84,6 @@ go-version-file: go.mod check-latest: true - name: Lint - uses: golangci/golangci-lint-action@v6 + uses: golangci/golangci-lint-action@v7 with: version: latest
A .golangci.yml
@@ -0,0 +1,7 @@ +version: "2" + +linters: + settings: + staticcheck: + dot-import-whitelist: + - "maragu.dev/gomponents/html"
M README.md → README.md
@@ -3,7 +3,7 @@ <img src="logo.png" alt="Logo" width="300" align="right"> [](https://pkg.go.dev/maragu.dev/gomponents) -[](https://github.com/maragudk/gomponents/actions/workflows/ci.yml) +[](https://github.com/maragudk/gomponents/actions/workflows/ci.yml) [](https://codecov.io/gh/maragudk/gomponents) [](https://goreportcard.com/report/maragu.dev/gomponents)
M gomponents.go → gomponents.go
@@ -243,7 +243,7 @@ // Rawf creates a text DOM [Node] that just Renders the interpolated and unescaped string format. func Rawf(format string, a ...interface{}) Node { return NodeFunc(func(w io.Writer) error { - _, err := w.Write([]byte(fmt.Sprintf(format, a...))) + _, err := fmt.Fprintf(w, format, a...) return err }) }