diff --git a/plugins/common/io.go b/plugins/common/io.go index f57b20e42..79e98452b 100644 --- a/plugins/common/io.go +++ b/plugins/common/io.go @@ -170,6 +170,7 @@ func SetPermissions(path string, fileMode os.FileMode) error { return os.Chown(path, uid, gid) } +// WriteSliceToFile writes a slice of strings to a file func WriteSliceToFile(filename string, lines []string) error { file, err := os.OpenFile(filename, os.O_RDWR|os.O_TRUNC, 0600) if err != nil {