some lint fixes

This commit is contained in:
ston1th 2021-11-05 22:10:52 +01:00
commit 9f4fda3c8b
11 changed files with 36 additions and 40 deletions

View file

@ -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)
}