aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.go16
1 files changed, 5 insertions, 11 deletions
diff --git a/main.go b/main.go
index a0f75bb..18969d0 100644
--- a/main.go
+++ b/main.go
@@ -9,18 +9,12 @@ import (
)
func parseArgs() string {
- // Check for at least one arg, bail if none
- if len(os.Args) < 2 {
- log.Fatalln("You must provide exactly one GitHub username.")
+ // We can only accept one argument
+ if len(os.Args) != 2 {
+ fmt.Println("Usage: gh_authkey_checker <username>")
+ os.Exit(1)
}
-
- // We have one arg possible comma separated
- if len(os.Args) == 2 {
- return os.Args[1]
- } else {
- log.Fatalln("You have provided too many arguments")
- }
- return ""
+ return os.Args[1]
}
func fetchKeys(username string) string {