Skip to content

Instantly share code, notes, and snippets.

@vladimirvivien
Last active September 13, 2017 17:16
Show Gist options
  • Save vladimirvivien/8ef82f9a5503eca82cdfdc90856a9a70 to your computer and use it in GitHub Desktop.
Save vladimirvivien/8ef82f9a5503eca82cdfdc90856a9a70 to your computer and use it in GitHub Desktop.
func main() {
file, err := os.Create("./magic_msg.txt")
if err != nil {
fmt.Println(err)
os.Exit(1)
}
defer file.Close()
if _, err := io.WriteString(file, "Go is fun!"); err != nil {
fmt.Println(err)
os.Exit(1)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment