some lint fixes
This commit is contained in:
parent
88ac31dcd9
commit
9f4fda3c8b
11 changed files with 36 additions and 40 deletions
|
|
@ -14,12 +14,12 @@ var (
|
|||
debug = false
|
||||
)
|
||||
|
||||
func InitLogger(cfg core.Config) {
|
||||
func InitLogger(cfg *core.Config) {
|
||||
debug = cfg.Debug
|
||||
if cfg.LogFile == "-" {
|
||||
return
|
||||
}
|
||||
f, err := os.OpenFile(filepath.Join(cfg.DataDir, cfg.LogFile), os.O_RDWR|os.O_CREATE|os.O_APPEND, 0640)
|
||||
f, err := os.OpenFile(filepath.Join(cfg.DataDir, cfg.LogFile), os.O_RDWR|os.O_CREATE|os.O_APPEND, 0o640)
|
||||
if err != nil {
|
||||
stdlog.Fatal(err)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue