(new): v1.2 release
Golang lint / lint (push) Successful in 11m32s

This commit is contained in:
2026-08-19 14:58:25 +03:00
parent f03a081ed6
commit 29b208eeec
79 changed files with 7301 additions and 2060 deletions
+23
View File
@@ -223,6 +223,29 @@ func TestBindArgsReportsConversionFailures(t *testing.T) {
}
}
func TestBindArgsRejectsNumericOverflow(t *testing.T) {
tests := []struct {
name string
arg string
dst any
}{
{name: "int8 positive", arg: "128", dst: &struct{ Value int8 }{}},
{name: "int8 negative", arg: "-129", dst: &struct{ Value int8 }{}},
{name: "uint8 positive", arg: "256", dst: &struct{ Value uint8 }{}},
{name: "uint8 negative", arg: "-1", dst: &struct{ Value uint8 }{}},
{name: "float32", arg: "3.5e39", dst: &struct{ Value float32 }{}},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
ctx := &MessageContext{Args: []string{tt.arg}}
if err := ctx.BindArgs(tt.dst); !errors.Is(err, ErrBindArgsConversion) {
t.Fatalf("expected ErrBindArgsConversion, got %v", err)
}
})
}
}
func TestBindArgsRejectsUnsupportedFieldTypes(t *testing.T) {
type input struct {
Tags []string