Skip to content

Instantly share code, notes, and snippets.

@vladimirvivien
Created September 13, 2017 16:40
Show Gist options
  • Save vladimirvivien/9717aba397c6bd9fd941a75ef7bac264 to your computer and use it in GitHub Desktop.
Save vladimirvivien/9717aba397c6bd9fd941a75ef7bac264 to your computer and use it in GitHub Desktop.
func main() {
proverbs := []string{
"Channels orchestrate mutexes serialize\n",
"Cgo is not Go\n",
"Errors are values\n",
"Don't panic\n",
}
for _, p := range proverbs {
n, err := os.Stdout.Write([]byte(p))
if err != nil {
fmt.Println(err)
os.Exit(1)
}
if n != len(p) {
fmt.Println("failed to write data")
os.Exit(1)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment