From 906aefb038b6baddc38f165bdfb6ecf624db398d Mon Sep 17 00:00:00 2001 From: mattyw Date: Sat, 7 Feb 2015 10:28:20 +0800 Subject: [PATCH] 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 --- src/cmd/gofmt/doc.go | 7 +++++++ 1 file changed, 7 insertions(+) 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 -- 2.50.0