From: mattyw Date: Sat, 7 Feb 2015 02:28:20 +0000 (+0800) Subject: gofmt/doc: gofmt -s output may not be backward compatible X-Git-Tag: go1.5beta1~2088 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=906aefb038b6baddc38f165bdfb6ecf624db398d;p=gostls13.git gofmt/doc: gofmt -s output may not be backward compatible Change-Id: If697ab554e6cb5545d99c6b103ed8bc54f69ed48 Reviewed-on: https://go-review.googlesource.com/4161 Reviewed-by: Andrew Gerrand --- diff --git a/src/cmd/gofmt/doc.go b/src/cmd/gofmt/doc.go index 3fc0439548..9d0cd32862 100644 --- a/src/cmd/gofmt/doc.go +++ b/src/cmd/gofmt/doc.go @@ -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