From c817e4b98ff0e9bc1f2e90d66a37797cf9779274 Mon Sep 17 00:00:00 2001 From: kiber-io <60169133+kiber-io@users.noreply.github.com> Date: Sat, 15 Mar 2025 18:22:32 +0400 Subject: [PATCH] Fix getting default value for keys without values in decode --- properties.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/properties.go b/properties.go index 5712b6a..4efa90e 100644 --- a/properties.go +++ b/properties.go @@ -103,6 +103,9 @@ func (p *Properties) Load(buf []byte, enc Encoding) error { // Otherwise, ok is false. func (p *Properties) Get(key string) (value string, ok bool) { v, ok := p.m[key] + if v == "" { + return "", false + } if p.DisableExpansion { return v, ok }