mirror of
https://github.com/pcvolkmer/idicon.git
synced 2025-04-19 16:46:50 +00:00
Log error if config file cannot be closed
This commit is contained in:
parent
43719eba8b
commit
f6d8bce2d5
@ -109,7 +109,12 @@ func configure(configFile string) {
|
|||||||
log.Printf("Invalid configuration file '%s' - ignore it.\n", configFile)
|
log.Printf("Invalid configuration file '%s' - ignore it.\n", configFile)
|
||||||
}
|
}
|
||||||
|
|
||||||
defer file.Close()
|
defer func(file *os.File) {
|
||||||
|
err := file.Close()
|
||||||
|
if err != nil {
|
||||||
|
log.Printf("Cannot close config file")
|
||||||
|
}
|
||||||
|
}(file)
|
||||||
config = *c
|
config = *c
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user