Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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
- })
Advertisement
Add Comment
Please, Sign In to add comment