Upstream gookit/config state of the touched files before db5b338b76

This commit is contained in:
upstream committed 2026-09-04 09:24:12 +02:00
1 parent cb6b9f9456
commit a78ca9b221
2 files changed
+6 -27

No files matched your search

-21
View File
@@ -499,24 +499,3 @@ func TestConfig_Duration_getter(t *testing.T) {
is.Eq(7*time.Second, c.Duration("missing", 7*time.Second))
is.Eq(time.Duration(0), c.Duration("missing"))
}
func TestConfig_GetValue_negativeIndex(t *testing.T) {
is := assert.New(t)
c := New("test-neg")
err := c.LoadData(map[string]any{
"arr": []any{"a", "b", "c"},
})
is.NoErr(err)
// A negative slice index must not panic; it is simply not found.
is.NotPanics(func() {
v, ok := c.GetValue("arr.-1")
is.False(ok)
is.Nil(v)
})
is.NotPanics(func() {
is.False(c.Exists("arr.-1"))
})
}