From 13f4111988242df9a67f64851f91e6b3fed74320 Mon Sep 17 00:00:00 2001 From: Madhur Shrimal Date: Tue, 10 Oct 2023 09:59:55 -0700 Subject: [PATCH] comment --- crypto/ecdsa/utils.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crypto/ecdsa/utils.go b/crypto/ecdsa/utils.go index 459d3063..0c1f51e1 100644 --- a/crypto/ecdsa/utils.go +++ b/crypto/ecdsa/utils.go @@ -40,6 +40,8 @@ func WriteKey(path string, privateKey *ecdsa.PrivateKey, password string) error func writeBytesToFile(path string, data []byte) error { dir := filepath.Dir(path) + + // create the directory if it doesn't exist. If exists, it does nothing if err := os.MkdirAll(dir, 0755); err != nil { fmt.Println("Error creating directories:", err) return err