kubo/test/cli/testutils/json.go
Marcin Rataj 6a008fc74c
refactor: apply go fix modernizers from Go 1.26 (#11190)
* chore: apply go fix modernizers from Go 1.26

automated refactoring: interface{} to any, slices.Contains,
and other idiomatic updates.

* feat(ci): add `go fix` check to Go analysis workflow

ensures Go 1.26 modernizers are applied, fails CI if `go fix ./...`
produces any changes (similar to existing `go fmt` enforcement)
2026-02-11 01:01:32 +01:00

14 lines
187 B
Go

package testutils
import "encoding/json"
type JSONObj map[string]any
func ToJSONStr(m JSONObj) string {
b, err := json.Marshal(m)
if err != nil {
panic(err)
}
return string(b)
}