_pkg.dev: drop util/io package

Unused.
This commit is contained in:
Roman Khimov 2019-08-26 14:28:53 +03:00
parent 10d5605166
commit 5938ebb85b

View file

@ -1,17 +0,0 @@
package fileutils
import (
"os"
)
// UpdateFile appends a byte slice to a file
func UpdateFile(filename string, data []byte) error {
f, err := os.OpenFile(filename, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644)
dataWNewline := append(data, []byte("\n")...)
_, err = f.Write(dataWNewline)
err = f.Close()
return err
}