]> Cypherpunks repositories - gostls13.git/commitdiff
unsafe: document that unsafe programs are not protected
authorRob Pike <r@golang.org>
Fri, 24 Oct 2014 16:37:25 +0000 (09:37 -0700)
committerRob Pike <r@golang.org>
Fri, 24 Oct 2014 16:37:25 +0000 (09:37 -0700)
The compatibility guideline needs to be clear about this even
though it means adding a clause that was not there from the
beginning. It has always been understood, so this isn't really
a change in policy, just in its expression.

LGTM=bradfitz, gri, rsc
R=golang-codereviews, bradfitz, gri, rsc
CC=golang-codereviews
https://golang.org/cl/162060043

doc/go1compat.html
src/unsafe/unsafe.go

index 04a6c1124b88aa0997318d6eec615caaa9932a90..94c48d2ce368945beb6ade82c5818b8fb6adba0d 100644 (file)
@@ -104,6 +104,14 @@ outside of tests, and using it may cause a program to fail
 to compile in future releases.
 </li>
 
+<li>
+Use of package <code>unsafe</code>. Packages that import
+<a href="/pkg/unsafe/"><code>unsafe</code></a>
+may depend on internal properties of the Go implementation.
+We reserve the right to make changes to the implementation
+that may break such programs.
+</li>
+
 </ul>
 
 <p>
index 83b2e140523fb58ecaa64b6239ac5a0e1ff447da..79499b2955f633b50d6da71c1cc658168a71d5fd 100644 (file)
@@ -4,6 +4,9 @@
 
 /*
        Package unsafe contains operations that step around the type safety of Go programs.
+
+       Packages that import unsafe may be non-portable and are not protected by the
+       Go 1 compatibility guidelines.
 */
 package unsafe