Closed willeccles closed 5 years ago
Hi,
Thanks for your contribution! I've had a quick look over it and it looks good to me. I'm not particularly familiar with Kitty, but I'll trust it works for whatever input/output Kitty expects.
One side note, I'd rather not have helper functions such as the "KittySplit". It could get a little messy in the long run. If you could inline that as you've done for the sorting function (or like in this example https://play.golang.org/p/zd2s0V5Ye3U), that would be great. However, if you're just splitting on whitespace, I believe you can just use "Fields" and not "FieldsFunc" as it will by default split on whitespace, so the function may not be required at all.
If you could please fix that, I'll merge the pull request.
Done. Thanks for the tip on strings.Fields
. This is my first time using Go. Coming from C/C++, it's a little strange to have simple functions like that, so sometimes I just accept that something might be the best way even if it's more complicated. bbe87a0 should have fixed that up for you, and we should be ready to merge.
Done. Thanks!
This is a fix for #5, which adds support for inputting and outputting in the kitty.conf format. This supersedes #6, which was hopelessly broken. Side-note: the sorting code implemented in e4b8631 could be used to sort any other input, though it takes a little bit of effort to implement due to string replacement and such.