some bug fixes
This commit is contained in:
parent
5649acf6a8
commit
577cf4d482
10 changed files with 83 additions and 17 deletions
|
|
@ -125,6 +125,30 @@ func loadConfig() error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if config.RunDir == "" {
|
||||
config.RunDir = defRunDir
|
||||
}
|
||||
if config.User == "" {
|
||||
config.User = defRunUser
|
||||
}
|
||||
if config.Group == "" {
|
||||
config.Group = defRunGroup
|
||||
}
|
||||
if config.ListenAddr == "" {
|
||||
config.ListenAddr = defListen
|
||||
}
|
||||
if config.LogFile == "" {
|
||||
config.LogFile = defLogFile
|
||||
}
|
||||
if config.CMDTimeout == 0 {
|
||||
config.CMDTimeout = defTimeout
|
||||
}
|
||||
if config.TesseractThreads == 0 {
|
||||
config.TesseractThreads = tesseractThreads
|
||||
}
|
||||
if config.TesseractOEM == 0 {
|
||||
config.TesseractOEM = tesseractOEM
|
||||
}
|
||||
return file.Close()
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue