diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 4ff2337..b44c93a 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -13,10 +13,10 @@ jobs: steps: - uses: actions/checkout@v2 - name: golangci-lint - uses: golangci/golangci-lint-action@v0.2.0 + uses: golangci/golangci-lint-action@v2.2.0 with: # Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version. - version: v1.26 + version: v1.30 # Optional: golangci-lint command line arguments. # args: ./the-only-dir-to-analyze/... diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3f3efc1..fedecd1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,7 +12,7 @@ jobs: test: strategy: matrix: - go-version: [1.11.x, 1.12.x, 1.13.x, 1.14.x] + go-version: [1.11.x, 1.12.x, 1.13.x, 1.14.x, 1.15.x] runs-on: ubuntu-latest steps: - name: Install Go diff --git a/Makefile b/Makefile index 73e0603..fc86e7e 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -GOLANGCI_LINT_VERSION := "v1.27.0" +GOLANGCI_LINT_VERSION := "v1.30.0" lint: @test -s $(GOPATH)/bin/golangci-lint-$(GOLANGCI_LINT_VERSION) || (curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b /tmp $(GOLANGCI_LINT_VERSION) && mv /tmp/golangci-lint $(GOPATH)/bin/golangci-lint-$(GOLANGCI_LINT_VERSION)) diff --git a/_examples/zzap/main.go b/_examples/zzap/main.go index 6cfee83..a2f959c 100644 --- a/_examples/zzap/main.go +++ b/_examples/zzap/main.go @@ -31,7 +31,7 @@ func main() { } l.Debug("starting example") - l.Sugar().Infow("sample info", "one", 1, "two", 2) + l.Sugar().Infow("sample info", "one", 1, "two", 2, "special", "&>") l.Error("unexpected end of the world") lorem.Sentence(3, 6) diff --git a/logzpage/handler.go b/logzpage/handler.go index e6cac16..c0e212c 100644 --- a/logzpage/handler.go +++ b/logzpage/handler.go @@ -2,6 +2,7 @@ package logzpage import ( + "bytes" "encoding/json" "fmt" "html/template" @@ -23,7 +24,7 @@ type tplData struct { // Handler creates HTTP handler to expose entries from observers. func Handler(observers ...*logz.Observer) http.Handler { - //language=GoTemplate + // language=GoTemplate tpl := `{{- /*gotype: github.com/bool64/logz/logzpage.tplData*/ -}} @@ -77,7 +78,7 @@ func Handler(observers ...*logz.Observer) http.Handler {
{{ range .Entries }}