[release-branch.go1.5] doc: add Code of Conduct

Fixes #13073

Change-Id: I4fd9c6c61f1b9d49f66816839ca35209b4147ae3
Reviewed-on: https://go-review.googlesource.com/17167
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-on: https://go-review.googlesource.com/17168
Reviewed-by: Andrew Gerrand <adg@golang.org>
diff --git a/doc/conduct.html b/doc/conduct.html
new file mode 100644
index 0000000..bfd2904
--- /dev/null
+++ b/doc/conduct.html
@@ -0,0 +1,273 @@
+<!--{
+	"Title": "Go Community Code of Conduct",
+	"Path":  "/conduct",
+	"Template": true
+}-->
+
+<style>
+ul {
+	max-width: 800px;
+}
+ul ul {
+	margin: 0 0 5px;
+}
+</style>
+
+<h2>About the Code of Conduct</h2>
+
+<h3>Why have a Code of Conduct?</h3>
+
+<p>
+Online communities include people from many different backgrounds.
+The Go contributors are committed to providing a friendly, safe and welcoming
+environment for all, regardless of age, disability, gender, nationality, race,
+religion, sexuality, or similar personal characteristic.
+</p>
+
+<p>
+The first goal of the Code of Conduct is to specify a baseline standard
+of behavior so that people with different social values and communication
+styles can talk about Go effectively, productively, and respectfully.
+</p>
+
+<p>
+The second goal is to provide a mechanism for resolving conflicts in the
+community when they arise.
+</p>
+
+<p>
+The third goal of the Code of Conduct is to make our community welcoming to
+people from different backgrounds.
+Diversity is critical to the project; for Go to be successful, it needs
+contributors and users from all backgrounds.
+(See <a href="https://blog.golang.org/open-source">Go, Open Source, Community</a>.)
+</p>
+
+<p>
+With that said, a healthy community must allow for disagreement and debate.
+The Code of Conduct is not a mechanism for people to silence others with whom
+they disagree.
+</p>
+
+<h3>Where does the Code of Conduct apply?</h3>
+
+<p>
+If you participate in or contribute to the Go ecosystem in any way,
+you are encouraged to follow the Code of Conduct while doing so.
+</p>
+
+<p>
+Explicit enforcement of the Code of Conduct applies to the
+official forums operated by the Go project (“Go spaces”):
+</p>
+
+<ul>
+    <li>The official <a href="https://github.com/golang/">GitHub projects</a>
+        and <a href="https://go-review.googlesource.com/">code reviews</a>.
+    <li>The <a href="https://groups.google.com/group/golang-nuts">golang-nuts</a> and
+        <a href="https://groups.google.com/group/golang-dev">golang-dev</a> mailing lists.
+<li>The #go-nuts IRC channel on Freenode.
+<li>The <a href="https://reddit.com/r/golang">/r/golang subreddit</a>.
+</ul>
+
+<p>
+Other Go groups (such as conferences, meetups, and other unofficial forums) are
+encouraged to adopt this Code of Conduct. Those groups must provide their own
+moderators and/or working group (see below).
+</p>
+
+<h2>Gopher values</h2>
+
+<p>
+These are the values to which people in the Go community (“Gophers”) should aspire.
+</p>
+
+<ul>
+<li>Be friendly and welcoming
+<li>Be patient
+    <ul>
+    <li>Remember that people have varying communication styles and that not
+        everyone is using their native language.
+        (Meaning and tone can be lost in translation.)
+    </ul>
+<li>Be thoughtful
+    <ul>
+    <li>Productive communication requires effort.
+        Think about how your words will be interpreted.
+    <li>Remember that sometimes it is best to refrain entirely from commenting.
+    </ul>
+<li>Be respectful
+    <ul>
+    <li>In particular, respect differences of opinion.
+    </ul>
+<li>Be charitable
+    <ul>
+    <li>Interpret the arguments of others in good faith, do not seek to disagree.
+    <li>When we do disagree, try to understand why.
+    </ul>
+<li>Avoid destructive behavior:
+    <ul>
+    <li>Derailing: stay on topic; if you want to talk about something else,
+        start a new conversation.
+    <li>Unconstructive criticism: don't merely decry the current state of affairs;
+        offer—or at least solicit—suggestions as to how things may be improved.
+    <li>Snarking (pithy, unproductive, sniping comments)
+    <li>Discussing potentially offensive or sensitive issues;
+        this all too often leads to unnecessary conflict.
+    <li>Microaggressions: brief and commonplace verbal, behavioral and
+        environmental indignities that communicate hostile, derogatory or negative
+        slights and insults to a person or group.
+    </ul>
+</ul>
+
+<p>
+People are complicated.
+You should expect to be misunderstood and to misunderstand others;
+when this inevitably occurs, resist the urge to be defensive or assign blame.
+Try not to take offense where no offense was intended.
+Give people the benefit of the doubt.
+Even if the intent was to provoke, do not rise to it.
+It is the responsibility of <i>all parties</i> to de-escalate conflict when it arises.
+</p>
+
+<h2>Unwelcome behavior</h2>
+
+<p>
+These actions are explicitly forbidden in Go spaces:
+</p>
+
+<ul>
+<li>Insulting, demeaning, hateful, or threatening remarks.
+<li>Discrimination based on age, disability, gender, nationality, race,
+    religion, sexuality, or similar personal characteristic.
+<li>Bullying or systematic harassment.
+<li>Unwelcome sexual advances.
+<li>Incitement to any of these.
+</ul>
+
+<h2>Moderation</h2>
+
+<p>
+The Go spaces are not free speech venues; they are for discussion about Go.
+These spaces have moderators.
+The goal of the moderators is to facilitate civil discussion about Go.
+</p>
+
+<p>
+When using the official Go spaces you should act in the spirit of the “Gopher
+values”.
+If you conduct yourself in a way that is explicitly forbidden by the CoC,
+you will be warned and asked to stop.
+If you do not stop, you will be removed from our community spaces temporarily.
+Repeated, wilful breaches of the CoC will result in a permanent ban.
+</p>
+
+<p>
+Moderators are held to a higher standard than other community members.
+If a moderator creates an inappropriate situation, they should expect less
+leeway than others, and should expect to be removed from their position if they
+cannot adhere to the CoC.
+</p>
+
+<p>
+Complaints about moderator actions must be handled using the reporting process
+below.
+</p>
+
+<h2>Reporting issues</h2>
+
+<p>
+The Code of Conduct Working Group is a group of people that represent the Go
+community. They are responsible for handling conduct-related issues.
+Their purpose is to de-escalate conflicts and try to resolve issues to the
+satisfaction of all parties. They are:
+</p>
+
+<ul>
+	<li>Aditya Mukerjee &lt;dev@chimeracoder.net&gt;
+	<li>Andrew Gerrand &lt;adg@golang.org&gt;
+	<li>Dave Cheney &lt;dave@cheney.net&gt;
+	<li>Jason Buberel &lt;jbuberel@google.com&gt;
+	<li>Peggy Li &lt;peggyli.224@gmail.com&gt;
+	<li>Sarah Adams &lt;sadams.codes@gmail.com&gt;
+	<li>Steve Francia &lt;steve.francia@gmail.com&gt;
+	<li>Verónica López &lt;gveronicalg@gmail.com&gt;
+</ul>
+
+<p>
+If you encounter a conduct-related issue, you should report it to the
+Working Group using the process described below.
+<b>Do not</b> post about the issue publicly or try to rally sentiment against a
+particular individual or group.
+</p>
+
+<ul>
+<li>Mail <a href="mailto:conduct@golang.org">conduct@golang.org</a> or
+    <a href="https://golang.org/s/conduct-report">submit an anonymous report</a>.
+    <ul>
+    <li>Your message will reach the Working Group.
+    <li>Reports are confidential within the Working Group.
+    <li>Should you choose to remain anonymous then the Working Group cannot
+        notify you of the outcome of your report.
+    <li>You may contact a member of the group directly if you do not feel
+        comfortable contacting the group as a whole. That member will then raise
+        the issue with the Working Group as a whole, preserving the privacy of the
+        reporter (if desired).
+    <li>If your report concerns a member of the Working Group they will be recused
+        from Working Group discussions of the report.
+    <li>The Working Group will strive to handle reports with discretion and
+        sensitivity, to protect the privacy of the involved parties,
+        and to avoid conflicts of interest.
+    </ul>
+<li>You should receive a response within 48 hours (likely sooner).
+    (Should you choose to contact a single Working Group member,
+    it may take longer to receive a response.)
+<li>The Working Group will meet to review the incident and determine what happened.
+    <ul>
+    <li>With the permission of person reporting the incident, the Working Group
+        may reach out to other community members for more context.
+    </ul>
+<li>The Working Group will reach a decision as to how to act. These may include:
+    <ul>
+    <li>Nothing.
+    <li>A request for a private or public apology.
+    <li>A private or public warning.
+    <li>An imposed vacation (for instance, asking someone to abstain for a week
+        from a mailing list or IRC).
+    <li>A permanent or temporary ban from some or all Go spaces.
+    </ul>
+<li>The Working Group will reach out to the original reporter to let them know
+    the decision.
+<li>Appeals to the decision may be made to the Working Group,
+    or to any of its members directly.
+</ul>
+
+<p>
+<b>Note that the goal of the Code of Conduct and the Working Group is to resolve
+conflicts in the most harmonious way possible.</b>
+We hope that in most cases issues may be resolved through polite discussion and
+mutual agreement.
+Bannings and other forceful measures are to be employed only as a last resort.
+</p>
+
+<p>
+Changes to the Code of Conduct (including to the members of the Working Group)
+should be proposed using the
+<a href="https://golang.org/s/proposal-process">change proposal process</a>.
+</p>
+
+<h2>Summary</h2>
+
+<ul>
+<li>Treat everyone with respect and kindness.
+<li>Be thoughtful in how you communicate.
+<li>Don’t be destructive or inflammatory.
+<li>If you encounter an issue, please mail <a href="mailto:conduct@golang.org">conduct@golang.org</a>.
+</ul>
+
+<h3>Acknowledgements</h3>
+
+<p>
+Parts of this document were derived from the Code of Conduct documents of the
+Django, FreeBSD, and Rust projects.
+</p>
diff --git a/doc/contrib.html b/doc/contrib.html
index f5f6f68..66e5af9 100644
--- a/doc/contrib.html
+++ b/doc/contrib.html
@@ -94,10 +94,16 @@
 
 <p>
 Security-related issues should be reported to
-<a href="mailto:security@golang.org">security@golang.org</a>.
+<a href="mailto:security@golang.org">security@golang.org</a>.<br>
 See the <a href="/security">security policy</a> for more details.
 </p>
 
+<p>
+Community-related issues should be reported to
+<a href="mailto:conduct@golang.org">conduct@golang.org</a>.<br>
+See the <a href="/conduct">Code of Conduct</a> for more details.
+</p>
+
 <h3><a href="/doc/contribute.html">Contributing code</a></h3>
 
 <p>
diff --git a/doc/help.html b/doc/help.html
index 2cc4780..979d7bc 100644
--- a/doc/help.html
+++ b/doc/help.html
@@ -48,3 +48,9 @@
 meet to talk about Go. Find a chapter near you.
 </p>
 
+<h3 id="conduct"><a href="/conduct">Code of Conduct</a></h3>
+<p>
+Guidelines for participating in Go community spaces
+and a reporting process for handling issues.
+</p>
+