1
0
Fork 0

Fix acme.json file automatic creation

This commit is contained in:
NicoMen 2018-04-10 10:52:04 +02:00 committed by Traefiker Bot
parent b1be062437
commit 3be74bb275
16 changed files with 61 additions and 38 deletions

View file

@ -1,20 +0,0 @@
package acme
import "os"
// Check file content size
// Do not check file permissions on Windows right now
func checkFile(name string) (bool, error) {
f, err := os.Open(name)
if err != nil {
return false, err
}
defer f.Close()
fi, err := f.Stat()
if err != nil {
return false, err
}
return fi.Size() > 0, nil
}