]> Cypherpunks repositories - gostls13.git/commitdiff
gofmt/doc: gofmt -s output may not be backward compatible
authormattyw <gh@mattyw.net>
Sat, 7 Feb 2015 02:28:20 +0000 (10:28 +0800)
committerAndrew Gerrand <adg@golang.org>
Sun, 8 Feb 2015 05:13:00 +0000 (05:13 +0000)
Change-Id: If697ab554e6cb5545d99c6b103ed8bc54f69ed48
Reviewed-on: https://go-review.googlesource.com/4161
Reviewed-by: Andrew Gerrand <adg@golang.org>
src/cmd/gofmt/doc.go

index 3fc0439548f675692ff0f6db9d66012e91f4117a..9d0cd328623cb406c470f10fdea230d5a6fa08f2 100644 (file)
@@ -87,6 +87,13 @@ When invoked with -s gofmt will make the following source transformations where
                for x, _ = range v {...}
        will be simplified to:
                for x = range v {...}
+
+       A range of the form:
+               for _ = range v {...}
+       will be simplified to:
+               for range v {...}
+
+This may result in changes that are incompatible with earlier versions of Go.
 */
 package main