fix golint warnings

This commit is contained in:
kevin
2020-08-19 16:00:55 +08:00
parent 2ebb5b6b58
commit 9e14820698
14 changed files with 44 additions and 36 deletions

View File

@@ -28,6 +28,9 @@ func MaybeCreateFile(dir, subdir, file string) (fp *os.File, created bool, err e
func ClearAndOpenFile(fpath string) (*os.File, error) {
f, err := os.OpenFile(fpath, os.O_WRONLY|os.O_TRUNC, 0600)
if err != nil {
return nil, err
}
_, err = f.WriteString("")
if err != nil {