From 668ecb97321c60cf25ff7c0b36a9c8551127dc06 Mon Sep 17 00:00:00 2001 From: Eli Bendersky Date: Thu, 16 Dec 2021 20:16:44 -0800 Subject: [PATCH] Add brief FAQ section in the README to clarify common questions --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index 0b8bbab..992a769 100644 --- a/README.md +++ b/README.md @@ -78,3 +78,19 @@ Contributor translations of the Go by Example site are available in: Thanks to [Jeremy Ashkenas](https://github.com/jashkenas) for [Docco](http://jashkenas.github.io/docco/), which inspired this project. + +### FAQ + +#### I'm getting output in a different order from the example. Is the example wrong? + +Some of the examples demonstrate concurrent code which has a non-deterministic +execution order. It depends on how the Go runtime schedules its goroutines and +may vary by operating system, CPU architecture, or even Go version. + +It doesn't mean anything is wrong with the example. Typically the code in these +examples will be insensitive to the actual order of the output; if the code is +sensitive to the order - that's probably a bug - so feel free to report it. + + + +