fix golint warnings
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user