mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-20 23:41:23 +02:00
fix fields not being validated (introduced in 577a536), drop support of list string not starting with hyphen
This commit is contained in:
@@ -168,7 +168,7 @@ func TestStringToSlice(t *testing.T) {
|
||||
})
|
||||
t.Run("multiline", func(t *testing.T) {
|
||||
dst := make([]string, 0)
|
||||
convertible, err := ConvertString(" a\n b\n c", reflect.ValueOf(&dst))
|
||||
convertible, err := ConvertString("- a\n- b\n- c", reflect.ValueOf(&dst))
|
||||
ExpectTrue(t, convertible)
|
||||
ExpectNoError(t, err)
|
||||
ExpectDeepEqual(t, dst, []string{"a", "b", "c"})
|
||||
|
||||
Reference in New Issue
Block a user