-
Notifications
You must be signed in to change notification settings - Fork 931
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
lxddoc: Within a config group, alphabetically sort the config options #12114
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.
Could this be put into a separate function? That way, we could add unit tests to ensure the function does what it's supposed to do.
lxd/config/generate/lxddoc.go
Outdated
c := configEntry.(map[string]any) | ||
for k := range c { |
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.
c := configEntry.(map[string]any) | |
for k := range c { | |
for k := range configEntry.(map[string]any) { |
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.
Actually, c
is further used within the loop
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.
Oh right, I overlooked that.
Signed-off-by: Gabriel Mougard <gabriel.mougard@canonical.com>
Signed-off-by: Gabriel Mougard <gabriel.mougard@canonical.com>
ae1ac4c
to
2706a0f
Compare
@monstermunchkin added a unit test for the sorting function |
thanks |
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.
Works as expected, thanks! :)
This is ready for merging @tomponline
Alphabetically sort the config options within a config group