Closed dengliu closed 2 weeks ago
Hi,
StringMap checks that the path sent to it is a StringMap (map[string]string). If it does not match that type, then we return an empty map.
Ref: https://github.com/knadh/koanf/blob/7e52f5219bf02926169bacb637f109aea793fe47/tests/fs_test.go#L92
Describe the bug A clear and concise description of what the bug is. For a yaml object like this I expect
StringMap()
returns a map[string]string object like this below. However it returns an empty string withoutfmt.print
the integer to a string However,String()
doesfmt.print
the integer to a string.Does it make sense to make
StringMap()
consistent withString()
? I can cut a PR for this.{ "cpu_core_limit": "1", mem_limit:"50%", "concurrency_limit": "2"}
https://github.com/knadh/koanf/blob/master/getters.go#L458-L461
To Reproduce Steps / breaking unit test / example to reproduce the behavior
Expected behavior A clear and concise description of what you expected to happen.
Please provide the following information):
Additional context Add any other context about the problem here.