Exemplo n.º 1
1
Arquivo: util.go Projeto: NetSys/quilt
// WriteFile writes 'data' to the file 'filename' with the given permissions.
func WriteFile(filename string, data []byte, perm os.FileMode) error {
	a := afero.Afero{
		Fs: AppFs,
	}
	return a.WriteFile(filename, data, perm)
}
Exemplo n.º 2
0
Arquivo: io.go Projeto: NetSys/quilt
func overwrite(file string, message string) error {
	a := afero.Afero{
		Fs: appFs,
	}
	return a.WriteFile(file, []byte(message), 0666)
}