diff options
author | Carlos Alexandro Becker <caarlos0@users.noreply.github.com> | 2024-07-10 10:35:52 -0300 |
---|---|---|
committer | Carlos Alexandro Becker <caarlos0@users.noreply.github.com> | 2024-07-10 10:35:52 -0300 |
commit | e4cacf7319340b95d6d7d9059218c32251bf9b11 (patch) | |
tree | 55887f032c9ea8e17a168a56c9972ff39fe3526b | |
parent | ad01f380bd85a9aee962050f83e22c1ad8069145 (diff) |
fix: mkdir cache dir
-rw-r--r-- | log.go | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -22,6 +22,9 @@ func setupLog() (func() error, error) { if err != nil { return nil, err } + if err := os.MkdirAll(filepath.Dir(logFile), 0o644); err != nil { + return nil, err + } f, err := os.OpenFile(logFile, os.O_WRONLY|os.O_CREATE|os.O_APPEND, 0o644) if err != nil { return nil, err |