Closed kmala closed 6 years ago
Hi @kmala, Thanks for the patch but you cannot change the signature of existing functions like Load
since this would break everybody else's code. Maybe adding another function which loads into an existing Properties
object is a better approach. I have to think about this a bit more.
@kmala are you still going to work on that?
Yes.i want to work on this..What do you think about have these new functions as receivers for Properties struct since that already has Disable expansion flag.
func (p *Properties) Load(buf []byte, enc Encoding) error {
}
@magiconair i made changes to add a new Load function to the properties such that existing methods need not change.
In general that looks fine but something doesn't sit right with me on this approach but I can't put my finger on it. I'll think about this for 1-2 more days and if I can't come up with something better I'll merge it. Thank you!
@magiconair did you get a chance to look into this?
Sorry for the long delay. I'm relocating to another country with the family and that burns a lot of energy. After looking at this I think the right solution is to replace the loadXXX
functions with a Loader
which has parameters. I'll merge this and work on that so that I get to play with properties
again.
This will allow the users to disable expansion of the values during the load and read as just key value.