Created
September 13, 2017 16:40
-
-
Save vladimirvivien/9717aba397c6bd9fd941a75ef7bac264 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() { | |
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