Parcourir la source

Log if token not found in keyring

ayn2op il y a 2 ans
Parent
commit
91459d03f8
1 fichiers modifiés avec 5 ajouts et 1 suppressions
  1. 5 1
      main.go

+ 5 - 1
main.go

@@ -10,7 +10,11 @@ import (
 )
 
 func main() {
-	t, _ := keyring.Get(constants.Name, "token")
+	t, err := keyring.Get(constants.Name, "token")
+	if err != nil {
+		log.Println("token not found in keyring:", err)
+	}
+
 	token := flag.String("token", t, "The authentication token.")
 	flag.Parse()