style(api): remove redundant parentheses in type switch

This commit is contained in:
Julien Neuhart
2026-08-31 13:38:05 +02:00
parent 334f859d95
commit 923e5f71eb

View File

@@ -612,7 +612,7 @@ func (form *FormData) mustValue(key string, target any, defaultValue any) *FormD
val, ok := form.values[key]
if !ok || val[0] == "" {
switch t := (target).(type) {
switch t := target.(type) {
case *string:
*t = defaultValue.(string)
case *bool:
@@ -659,7 +659,7 @@ func (form *FormData) mustMandatoryField(key string, target any) *FormData {
func (form *FormData) mustAssign(key, value string, target any) *FormData {
var err error
switch t := (target).(type) {
switch t := target.(type) {
case *string:
*t = value
case *bool: