diff --git a/notifier.go b/notifier.go index 36e5d8a..547c9d9 100644 --- a/notifier.go +++ b/notifier.go @@ -75,6 +75,8 @@ func present(str interface{}) bool { case bool: return t == true } + + // If it was not nil, a blank string or false, we can assume it's present. return true } diff --git a/notifier_test.go b/notifier_test.go index bf9a7bf..3e3de50 100644 --- a/notifier_test.go +++ b/notifier_test.go @@ -265,6 +265,7 @@ func TestPresent(t *testing.T) { assert.False(t, present(false)) assert.True(t, present("not blank")) assert.True(t, present(true)) + assert.True(t, present(0.1)) } func TestEq(t *testing.T) {