Skip to content

Commit

Permalink
v0.1.0 sort.Sort()をsort.Slice()に変更する。
Browse files Browse the repository at this point in the history
  • Loading branch information
Chouette2100 committed Aug 13, 2022
1 parent 3d36862 commit f80d3c4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion t001srapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ type Config struct {
$ ./t000srapi config.yml
v0.0.0
v0.1.0 sort.Sort()をsort.Slice()に変更する。
*/
func main() {

Expand Down Expand Up @@ -125,7 +126,9 @@ func main() {
}

// ルームを配信開始時刻の降順にソートする
sort.Sort(*roomlive)
sort.Slice(*roomlive, func(i, j int) bool {
return (*roomlive)[i].Started_at > (*roomlive)[j].Started_at
})

log.Printf("\n")
log.Printf(" *** 指定したジャンルのルーム一覧(ソート後)\n")
Expand Down

0 comments on commit f80d3c4

Please sign in to comment.