We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 90bbf02 commit 7fe9852Copy full SHA for 7fe9852
src/aop.go
@@ -8,8 +8,9 @@ import (
8
)
9
10
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)
+ logPath := os.ExpandEnv(defaultLogPath)
+ os.MkdirAll(path.Dir(logPath), os.ModePerm)
13
+ f, err := os.OpenFile(logPath, os.O_RDWR|os.O_CREATE|os.O_APPEND, 0666)
14
if err != nil {
15
log.Fatalf("error opening file: %v", err)
16
}
0 commit comments