Compare commits
3 Commits
301c22be02
...
v1.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0b573aa169 | ||
|
|
7474028b82 | ||
|
|
120b7c995a |
@@ -1,10 +1,11 @@
|
|||||||
run:
|
run:
|
||||||
tests: false
|
tests: false
|
||||||
skip-dirs:
|
|
||||||
- vendor
|
|
||||||
modules-download-mode: readonly
|
modules-download-mode: readonly
|
||||||
allow-parallel-runners: true
|
allow-parallel-runners: true
|
||||||
go: '1.21'
|
go: '1.21'
|
||||||
|
issues:
|
||||||
|
skip-dirs:
|
||||||
|
- vendor
|
||||||
output:
|
output:
|
||||||
sort-results: true
|
sort-results: true
|
||||||
linters:
|
linters:
|
||||||
|
|||||||
11
util.go
11
util.go
@@ -34,7 +34,11 @@ func readConf() (Config, error) {
|
|||||||
|
|
||||||
cnf, err = readConfFile(os.Getenv("HOME") + "/.reniced.yaml")
|
cnf, err = readConfFile(os.Getenv("HOME") + "/.reniced.yaml")
|
||||||
} else {
|
} else {
|
||||||
cnf, err = readConfFile("/etc/reniced.yaml")
|
if runtime.GOOS == "freebsd" {
|
||||||
|
cnf, err = readConfFile("/usr/local/etc/reniced.yaml")
|
||||||
|
} else {
|
||||||
|
cnf, err = readConfFile("/etc/reniced.yaml")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return cnf, err
|
return cnf, err
|
||||||
@@ -69,11 +73,6 @@ func readConfFile(path string) (Config, error) {
|
|||||||
return Config{}, err
|
return Config{}, err
|
||||||
}
|
}
|
||||||
|
|
||||||
if cfg.CmdDelay == 0 {
|
|
||||||
cfg.CmdDelay = 20
|
|
||||||
log.Printf("cmd_delay can not be 0, setting to %d milliseconds", cfg.CmdDelay)
|
|
||||||
}
|
|
||||||
|
|
||||||
if cfg.LoopDelay == 0 {
|
if cfg.LoopDelay == 0 {
|
||||||
cfg.LoopDelay = 2000
|
cfg.LoopDelay = 2000
|
||||||
log.Printf("loop_delay set to %d milliseconds", cfg.LoopDelay)
|
log.Printf("loop_delay set to %d milliseconds", cfg.LoopDelay)
|
||||||
|
|||||||
Reference in New Issue
Block a user