mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-10 02:43:37 +02:00
refactor: modernize code with go fix
This commit is contained in:
@@ -67,10 +67,10 @@ func TestValidateWithCustomValidator_CustomValidatingStringPointer(t *testing.T)
|
||||
input *CustomValidatingString
|
||||
wantErr bool
|
||||
}{
|
||||
{"valid custom validating string pointer", ptr(CustomValidatingString("hello")), false},
|
||||
{"valid custom validating string pointer", new(CustomValidatingString("hello")), false},
|
||||
{"nil custom validating string pointer", nil, true},
|
||||
{"invalid custom validating string pointer - empty", ptr(CustomValidatingString("")), true},
|
||||
{"invalid custom validating string pointer - too short", ptr(CustomValidatingString("a")), true},
|
||||
{"invalid custom validating string pointer - empty", new(CustomValidatingString("")), true},
|
||||
{"invalid custom validating string pointer - too short", new(CustomValidatingString("a")), true},
|
||||
}
|
||||
|
||||
for _, tt := range tests {
|
||||
|
||||
Reference in New Issue
Block a user