Fixed issue with lists by adding a policy #6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixed a bug in the
ListFlag
where if you tried to set something, say in-languages ru,ro
and your defaults areen,de
the result becameen, de, ru, ro
instead ofru, ro
so the default action is to now go toru, ro
and if you want to enable theen, de, ru, ro
you can set thefigtree.PolicyListAppend = true
package wide property. The figtree is designed to be used in many different instances offigtree.Plant
, say one YAML config file for each user's preferences. Then you run the.SaveTo(path)
and.ReadFrom(path)
you can easily set up on yourtype User struct { Persona figtree.Plant }
and then use the power ofme := User{Persona: figtree.Grow()}
and then you can dome.Persona.NewString("name", "", "my name")
, then when I run the app, after.Parse()
is called, you get-name "andrei"
then*me.Persona.String("name")
isandrei
. The issue in the list came up in this use case for favorites, removing items off the list wasn't easy with this bug that has since been squashed. Also, 207 is my old area code growing up! Cool that we're on 2.0.7 already! Sprinkled in this code is an experiment that I am conducting with Cody and SourceGraph to enable sourcing strategies on these structure types in a factory like pattern.