alibaba / sentinel-golang

Sentinel Go enables reliability and resiliency for Go microservices
https://sentinelguard.io/
Apache License 2.0
2.76k stars 431 forks source link

[BUG] hotspot.Rule marshal unsupported type map[interface{}]int64 via x.SpecificItems #505

Closed sczyh30 closed 1 year ago

sczyh30 commented 1 year ago

Issue Description

Type: bug report

Describe what happened

Lint error:

  Error: core/hotspot/rule.go:104:25: SA1026: trying to marshal unsupported type map[interface{}]int64, via x.SpecificItems (staticcheck)
    b, err := json.Marshal(r)
                           ^

Describe what you expected to happen

How to reproduce it (as minimally and precisely as possible)

Run the golangci-lint check.

Tell us your environment

go version go1.18.9 linux/amd64, Sentinel Go v1.0.4

Fkbqf commented 1 year ago

please assign it to me