Ver código fonte

Log if token not found in keyring

ayn2op 2 anos atrás
pai
commit
91459d03f8
1 arquivos alterados com 5 adições e 1 exclusões
  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()