Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow disable expansion during the load #26

Merged
merged 1 commit into from
May 15, 2018

Conversation

kmala
Copy link
Contributor

@kmala kmala commented Nov 14, 2017

This will allow the users to disable expansion of the values during the load and read as just key value.

@magiconair
Copy link
Owner

magiconair commented Nov 14, 2017

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.

@magiconair
Copy link
Owner

@kmala are you still going to work on that?

@kmala
Copy link
Contributor Author

kmala commented Dec 15, 2017

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 {
}

@kmala
Copy link
Contributor Author

kmala commented Mar 22, 2018

@magiconair i made changes to add a new Load function to the properties such that existing methods need not change.

@magiconair
Copy link
Owner

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!

@kmala
Copy link
Contributor Author

kmala commented Apr 19, 2018

@magiconair did you get a chance to look into this?

@magiconair
Copy link
Owner

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.

@magiconair magiconair merged commit e7f3235 into magiconair:master May 15, 2018
@magiconair magiconair mentioned this pull request May 15, 2018
@magiconair magiconair added this to the 1.8.0 milestone Feb 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants