syntax fixes

This commit is contained in:
ston1th 2021-11-05 21:55:18 +01:00
commit 1ce33aa89a
13 changed files with 45 additions and 43 deletions

View file

@ -19,7 +19,7 @@ func Stderr() {
log = stdlog.New(os.Stderr, "", stdlog.LstdFlags)
}
func InitLogger(cfg core.Config) {
func InitLogger(cfg *core.Config) {
debug = cfg.Debug
if cfg.LogFile == "-" {
return
@ -30,7 +30,7 @@ func InitLogger(cfg core.Config) {
stdlog.Fatal(err)
return
}
f, err := os.OpenFile(logfile, os.O_RDWR|os.O_CREATE|os.O_APPEND, 0600)
f, err := os.OpenFile(logfile, os.O_RDWR|os.O_CREATE|os.O_APPEND, 0o600)
if err != nil {
stdlog.Fatal(err)
}