Skip to content

Commit 63e4089

Browse files
committed
Add bool-specific test
1 parent ce31e42 commit 63e4089

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

envconfig_test.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1506,6 +1506,18 @@ func TestProcessWith(t *testing.T) {
15061506
"FIELD": "foo",
15071507
}),
15081508
},
1509+
{
1510+
name: "bool_pointer",
1511+
input: &struct {
1512+
Field *bool `env:"FIELD,noinit"`
1513+
}{},
1514+
exp: &struct {
1515+
Field *bool `env:"FIELD,noinit"`
1516+
}{
1517+
Field: nil,
1518+
},
1519+
lookuper: MapLookuper(nil),
1520+
},
15091521

15101522
// Marshallers
15111523
{

0 commit comments

Comments
 (0)