Skip to content

Commit 7fe9852

Browse files
relastleHiroki-Konishi
authored andcommitted
Fix: minor
1 parent 90bbf02 commit 7fe9852

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/aop.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ import (
88
)
99

1010
func measureElapsedTime(start time.Time, name string) {
11-
os.MkdirAll(path.Dir(defaultLogPath), os.ModePerm)
12-
f, err := os.OpenFile(os.ExpandEnv(defaultLogPath), os.O_RDWR|os.O_CREATE|os.O_APPEND, 0666)
11+
logPath := os.ExpandEnv(defaultLogPath)
12+
os.MkdirAll(path.Dir(logPath), os.ModePerm)
13+
f, err := os.OpenFile(logPath, os.O_RDWR|os.O_CREATE|os.O_APPEND, 0666)
1314
if err != nil {
1415
log.Fatalf("error opening file: %v", err)
1516
}

0 commit comments

Comments
 (0)