-
Notifications
You must be signed in to change notification settings - Fork 30
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
aeaconf2
integration
#178
base: master
Are you sure you want to change the base?
aeaconf2
integration
#178
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks really cool. Should be a huge QoL improvement for writing configs.
Pass []cond | ||
PassOverride []cond | ||
} | ||
var funcRegistry map[string]reflect.Type |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can init this in var with type inference eg var funcRegistry = make(map[string]reflect.Type)
. Having a map to a reflect type smells really bad though LOL I'll have to understand the code
return err | ||
} | ||
field.SetString(datum) | ||
} else if fieldType.Implements(reflect.TypeOf((*aeaconf2.Condition)(nil)).Elem()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This may look better as a function on the aeaconf struct. Maybe something like ModifyFields
that takes a func(string) string
as a parameter? Then we don't have to do the Implements stuff
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I could probably just do that on the aeaconf
side
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added on v0.1.2
(compat.ModifyConditionStrings
)
Tracking issue for new config format:
https://github.com/safinsingh/aeaconf2
This initial commit contains some basic work for integrating
aeaconf2
. It does not compile yet. Transitioning should be fairly easy based on what I've done already. Please let me know if I need to make any changes toaeaconf2
to accommodate foraeacus
's functionality.