minor fix x2

This commit is contained in:
rigel rozanski
2017-04-21 12:34:29 -04:00
committed by Ethan Buchman
parent 6da5f72de9
commit 55e4cf17fd
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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)
+1 -1
View File
@@ -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)