Jeffrey Walter
Jeffrey Walter
Hello, thank you for your PR! I made a branch to test out your changes and made some modifications to your proposed solution. Would you mind pulling down this branch...
I don't really have an opinion about how you guys solve the problem. I think giving user the ability to implement their own sorting logic is fine. I personally think...
Perhaps something like this: ``` import ( "sort" "strconv" ) func sortAsc(ms MigrationSlice) { sort.Slice(ms, func(i, j int) bool { return naturalLess(ms[i].Name, ms[j].Name) }) } func sortDesc(ms MigrationSlice) { sort.Slice(ms,...
Or this if you're not adverse to using a library: ``` import ( "sort" "golang.org/x/text/collate" "golang.org/x/text/language" ) var coll = collate.New(language.Und, collate.Numeric) func sortAsc(ms MigrationSlice) { sort.Slice(ms, func(i, j int)...
Great, when can I expect a fix for this then? Personally, I think the natural sort is the better solution here. You guys are going to make a mess of...
@Aoang I updated the PR to include `WithSort()`
@bevzzz unfortunately, I'm no longer able to make changes to that repo. I left that company. So, feel free to make any updates you want to address the issue.
PR: https://github.com/uptrace/bun/pull/1186
Alright, you want to play that game, whatever. The timestamps are represented as ints in bun's case. You don't think sorting them as strings is incorrect? I think that's stupid.
Even if other libraries do it, the choice of using a timestamp is also pretty stupid and a pain in the ass to deal with. It shouldn't necessitate a tool...