diff --git a/cmd/commands/init.go b/cmd/commands/init.go index 68b2ab3899b4..f7fae72e6c58 100644 --- a/cmd/commands/init.go +++ b/cmd/commands/init.go @@ -22,7 +22,7 @@ var ( // returns 1 iff it set a file, otherwise 0 (so we can add them) func setupFile(path, data string, perm os.FileMode) (int, error) { _, err := os.Stat(path) - if !os.IsNotExist(err) { //permission errors generated if use os.IsExist + if !os.IsNotExist(err) { //note, os.IsExist(err) != !os.IsNotExist(err) return 0, nil } err = ioutil.WriteFile(path, []byte(data), perm) diff --git a/cmd/commands/query.go b/cmd/commands/query.go index f73ed0ada0d8..7d79c2f1f2f6 100644 --- a/cmd/commands/query.go +++ b/cmd/commands/query.go @@ -199,7 +199,7 @@ func verifyCmd(cmd *cobra.Command, args []string) error { proofBytes, err := hex.DecodeString(StripHex(proofFlag)) if err != nil { - return errors.Errorf("Proof (%v) is invalid hex: %v\n", proofBytes, err) + return errors.Errorf("Proof (%v) is invalid hex: %v\n", proofFlag, err) } proof, err := merkle.ReadProof(proofBytes)