Last active
September 13, 2017 17:16
-
-
Save vladimirvivien/8ef82f9a5503eca82cdfdc90856a9a70 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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