From e4cb9c6cef2d75cdc5ca62777d2fa0e44f813fd4 Mon Sep 17 00:00:00 2001 From: "Joe Richey joerichey@google.com" Date: Mon, 17 Jul 2017 23:18:49 -0700 Subject: cmd/fscrypt: more nits to fix "make lint" --- cmd/fscrypt/errors.go | 1 - cmd/fscrypt/flags.go | 2 +- cmd/fscrypt/keys.go | 2 +- cmd/fscrypt/prompt.go | 2 +- cmd/fscrypt/strings.go | 2 -- 5 files changed, 3 insertions(+), 6 deletions(-) diff --git a/cmd/fscrypt/errors.go b/cmd/fscrypt/errors.go index f11ff12..e0875e9 100644 --- a/cmd/fscrypt/errors.go +++ b/cmd/fscrypt/errors.go @@ -42,7 +42,6 @@ const failureExitCode = 1 // Various errors used for the top level user interface var ( - ErrReadingStdin = util.SystemError("read from standard input failed") ErrCanceled = errors.New("operation canceled") ErrNoDesctructiveOps = errors.New("operation would be destructive") ErrMaxPassphrase = util.SystemError("max passphrase length exceeded") diff --git a/cmd/fscrypt/flags.go b/cmd/fscrypt/flags.go index 16412bf..d54a3bd 100644 --- a/cmd/fscrypt/flags.go +++ b/cmd/fscrypt/flags.go @@ -51,7 +51,7 @@ func (b *boolFlag) GetArgName() string { return "" } func (b *boolFlag) GetUsage() string { return b.Usage } func (b *boolFlag) String() string { - if b.Default == false { + if !b.Default { return longDisplay(b) } return longDisplay(b, strconv.FormatBool(b.Default)) diff --git a/cmd/fscrypt/keys.go b/cmd/fscrypt/keys.go index 65360a9..872ca2a 100644 --- a/cmd/fscrypt/keys.go +++ b/cmd/fscrypt/keys.go @@ -87,7 +87,7 @@ func (p passphraseReader) Read(buf []byte) (int, error) { // the passphrase into the key normally. func getPassphraseKey(prompt string) (*crypto.Key, error) { if !quietFlag.Value { - fmt.Printf(prompt) + fmt.Print(prompt) } // Only disable echo if stdin is actually a terminal. diff --git a/cmd/fscrypt/prompt.go b/cmd/fscrypt/prompt.go index 52f8c47..b882c08 100644 --- a/cmd/fscrypt/prompt.go +++ b/cmd/fscrypt/prompt.go @@ -282,7 +282,7 @@ func promptForProtector(options []*actions.ProtectorOption) (int, error) { } if numLoadErrors > 0 { - fmt.Printf(wrapText("NOTE: %d of the %d protectors failed to load. "+loadHelpText, 0)) + fmt.Print(wrapText("NOTE: %d of the %d protectors failed to load. "+loadHelpText, 0)) } for { diff --git a/cmd/fscrypt/strings.go b/cmd/fscrypt/strings.go index b77389f..fb79c38 100644 --- a/cmd/fscrypt/strings.go +++ b/cmd/fscrypt/strings.go @@ -49,8 +49,6 @@ const ( directoryArg = "DIRECTORY" mountpointArg = "MOUNTPOINT" pathArg = "PATH" - archiveArg = "ARCHIVE_FILE" - recoveryCodeArg = "RECOVERY_CODE" mountpointIDArg = mountpointArg + ":ID" ) -- cgit v1.2.3