switch order of course name and id when listing

This commit is contained in:
Vineet K 2023-11-15 13:30:45 -05:00
parent ba523ee94e
commit b966951c47

View File

@ -55,7 +55,7 @@ func list_all_courses() {
canvas_courses := get_courses(token, all_courses, client) canvas_courses := get_courses(token, all_courses, client)
for _, course := range canvas_courses { for _, course := range canvas_courses {
fmt.Printf("%s, %d\n", course.Name, course.ID%10000) fmt.Printf("%d, %s\n", course.ID%10000, course.Name)
} }
} }
@ -67,6 +67,6 @@ func list_favorite_courses() {
canvas_courses := get_courses(token, favorites, client) canvas_courses := get_courses(token, favorites, client)
for _, course := range canvas_courses { for _, course := range canvas_courses {
fmt.Printf("%s, %d\n", course.Name, course.ID%10000) fmt.Printf("%d, %s\n", course.ID%10000, course.Name)
} }
} }