gempir icon

Untitled

gempir | PRO | 01/02/19 06:36:49 PM UTC | 0 ⭐ | 650 👁️ | Never ⏰ | []
Go |

250 B

|

None

|

0 👍

/

0 👎

    sort.Slice(logFiles, func(i, j int) bool {
        yearA, _ := strconv.Atoi(logFiles[i].year)
        yearB, _ := strconv.Atoi(logFiles[j].year)
        monthA, _ := strconv.Atoi(logFiles[j].month)
        monthB, _ := strconv.Atoi(logFiles[j].month)
        return numA > numB
    })

Comments