gobyexample/057-writing-files/writing-files.go
Mark McGranaghan e4b083d49b index work
2012-09-23 17:45:04 -07:00

17 lines
239 B
Go

// ## Writing Files
package main
import "os"
func main() {
file, err := os.Create("xx-file-write.txt")
if err != nil {
panic(err)
}
defer file.Close()
file.WriteString("contents\n")
}
// todo: streaming writes