Descriptiongofmt: implemented -ss ("strong simplify") feature In contrast to gofmt -s, which enables idiomatic simplifications but leaves the programmers intentions with respect to expression of code intact, gofmt -ss is free to simplify code automatically as much as possible while preserving semantics. For instance, gofmt -s will simplify s[0:len(s)] to s[0:]; gofmt -ss will go a step further and replace s[0:b] to s[:b] (and thus s[0:len(s)] to s[:]). There is no intention in applying gofmt -ss to the basic library; this is simply a useful tool that may be applied on an individual basis. Currently implemented -ss simplifications: - v = v op y becomes: v op= y - v += 1 becomes: v++ - v -= 1 becomes: v-- - s[0:b] becomes s[:b] Patch Set 1 #Patch Set 2 : diff -r 170a9dc2724e https://code.google.com/p/go #Patch Set 3 : diff -r fc6bbf557dac https://code.google.com/p/go #Patch Set 4 : diff -r a2f1842353e7 https://code.google.com/p/go #Patch Set 5 : diff -r 5ff1a3660917 https://code.google.com/p/go #Patch Set 6 : diff -r e29b9036a11a https://code.google.com/p/go #
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||