updated dependencies and go

This commit is contained in:
2026-04-21 11:06:01 +02:00
parent f62e7499ec
commit 84b87d61f2
91 changed files with 551 additions and 637 deletions
+14 -15
View File
@@ -41,7 +41,7 @@ type Optionals struct {
Uo uint `json:"uo,omitempty"`
Str struct{} `json:"str"`
Sto struct{} `json:"sto,omitempty"`
Sto struct{} `json:"sto"`
}
func TestOmitEmpty(t *testing.T) {
@@ -1166,8 +1166,7 @@ func TestMarshalUncommonFieldNames(t *testing.T) {
}
func TestMarshalerError(t *testing.T) {
s := "test variable"
st := reflect.TypeOf(s)
st := reflect.TypeFor[string]()
const errText = "json: test error"
tests := []struct {
@@ -1222,18 +1221,18 @@ func TestIssue63379(t *testing.T) {
func TestMarshalSafeCollections(t *testing.T) {
var (
nilSlice []interface{}
pNilSlice *[]interface{}
nilMap map[string]interface{}
pNilMap *map[string]interface{}
nilSlice []any
pNilSlice *[]any
nilMap map[string]any
pNilMap *map[string]any
)
type (
nilSliceStruct struct {
NilSlice []interface{} `json:"nil_slice"`
NilSlice []any `json:"nil_slice"`
}
nilMapStruct struct {
NilMap map[string]interface{} `json:"nil_map"`
NilMap map[string]any `json:"nil_map"`
}
testWithFilter struct {
Test1 string `json:"test1" jsonfilter:"FILTERONE"`
@@ -1242,19 +1241,19 @@ func TestMarshalSafeCollections(t *testing.T) {
)
tests := []struct {
in interface{}
in any
want string
}{
{nilSlice, "[]"},
{[]interface{}{}, "[]"},
{make([]interface{}, 0), "[]"},
{[]any{}, "[]"},
{make([]any, 0), "[]"},
{[]int{1, 2, 3}, "[1,2,3]"},
{pNilSlice, "null"},
{nilSliceStruct{}, "{\"nil_slice\":[]}"},
{nilMap, "{}"},
{map[string]interface{}{}, "{}"},
{make(map[string]interface{}, 0), "{}"},
{map[string]interface{}{"1": 1, "2": 2, "3": 3}, "{\"1\":1,\"2\":2,\"3\":3}"},
{map[string]any{}, "{}"},
{make(map[string]any, 0), "{}"},
{map[string]any{"1": 1, "2": 2, "3": 3}, "{\"1\":1,\"2\":2,\"3\":3}"},
{pNilMap, "null"},
{nilMapStruct{}, "{\"nil_map\":{}}"},
{testWithFilter{}, "{\"test1\":\"\"}"},