Skip to content

Conversation

andreimerlescu
Copy link
Owner

Fixed a bug in the ListFlag where if you tried to set something, say in -languages ru,ro and your defaults are en,de the result became en, de, ru, ro instead of ru, ro so the default action is to now go to ru, ro and if you want to enable the en, de, ru, ro you can set the figtree.PolicyListAppend = true package wide property. The figtree is designed to be used in many different instances of figtree.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 your type User struct { Persona figtree.Plant } and then use the power of me := User{Persona: figtree.Grow()} and then you can do me.Persona.NewString("name", "", "my name"), then when I run the app, after .Parse() is called, you get -name "andrei" then *me.Persona.String("name") is andrei. 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.

@andreimerlescu andreimerlescu merged commit d9a5048 into main Apr 26, 2025
6 checks passed
@andreimerlescu andreimerlescu deleted the hotfix/new-flesh branch April 26, 2025 14:00
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.

1 participant