magiconair/properties ? reverse-engineered prompt
Reverse engineered prompt
Build me a Go library for reading and writing Java style properties files.
I want it to be able to load properties from a file, multiple files, a string, a map, or a URL, and also support environment variables in file paths. It should handle comments and keep the original key order when possible, and let me write the properties back out after editing them. Please support Spring style variable expansion too, so values like ${key} can resolve other properties, and ${USER} can pull from environment variables.
I also want a clean way to read values into Go structs with tags, maps, arrays, and basic typed values like strings, ints, booleans, and durations. Make the common helpers feel easy to use, including Must style methods and configurable error handling. Support both UTF 8 and ISO 8859 1 encoded files.
If anything needs current Go docs or edge case behavior, look it up online and match common expectations.
Are you gonna build this?
make sure you review the code using coderabbit