Skip to content
This repository has been archived by the owner on Oct 11, 2023. It is now read-only.

Commit

Permalink
Update login.go (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
yunussandikci authored Oct 23, 2020
1 parent 97dc0a2 commit 052509a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cmd/login.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"golang.org/x/crypto/ssh/terminal"
"os"
"strings"
"syscall"
)

// loginCmd represents the login command
Expand All @@ -21,7 +20,7 @@ var loginCmd = &cobra.Command{
fmt.Print("Api Key: ")
apiKey, _ := reader.ReadString('\n')
fmt.Print("Api Secret: ")
apiSecret, _ := terminal.ReadPassword(syscall.Stdin)
apiSecret, _ := terminal.ReadPassword(int(os.Stdin.Fd()))
configService := internal.NewConfigService()
configService.Set(internal.ApiKey, strings.TrimSpace(apiKey))
configService.Set(internal.ApiSecret, strings.TrimSpace(string(apiSecret)))
Expand Down

0 comments on commit 052509a

Please sign in to comment.