summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go9
1 files changed, 4 insertions, 5 deletions
diff --git a/main.go b/main.go
index 3390dbd..6f97efa 100644
--- a/main.go
+++ b/main.go
@@ -54,7 +54,7 @@ func main() {
54 } 54 }
55 55
56 if listall { 56 if listall {
57 list_all_courses() 57 _ = list_all_courses(false)
58 os.Exit(0) 58 os.Exit(0)
59 } 59 }
60 60
@@ -71,10 +71,6 @@ func main() {
71 if len(code) == 5 && course != -1 { 71 if len(code) == 5 && course != -1 {
72 fmt.Printf("%d %s\n", course, code) 72 fmt.Printf("%d %s\n", course, code)
73 submit_code(course, code) 73 submit_code(course, code)
74 } else if code != "" && course == -1 {
75 fmt.Println("Course code not provided")
76 usage()
77 os.Exit(1)
78 } else if code == "" && course != -1 { 74 } else if code == "" && course != -1 {
79 fmt.Println("Attendance code not provided") 75 fmt.Println("Attendance code not provided")
80 usage() 76 usage()
@@ -83,5 +79,8 @@ func main() {
83 fmt.Println("Attendance code must be 5 characters long") 79 fmt.Println("Attendance code must be 5 characters long")
84 usage() 80 usage()
85 os.Exit(1) 81 os.Exit(1)
82 } else if len(code) == 5 && course == -1 {
83 fmt.Println("Checking which course to send the code to")
84 submit_code_sans_course(code)
86 } 85 }
87} 86}