package main import "io/ioutil" func main() { greeting := "Hi there!\\n" ioutil.WriteFile("myFile", []byte(greeting), 0666) }