gofmt -r 'α[β:len(α)] -> α[β:]' -w src/cmd src/pkg
R=r, gri
CC=golang-dev
https://golang.org/cl/156115
diff --git a/src/pkg/fmt/print.go b/src/pkg/fmt/print.go
index 15def46..cecdda0 100644
--- a/src/pkg/fmt/print.go
+++ b/src/pkg/fmt/print.go
@@ -603,7 +603,7 @@
end := len(format) - 1;
fieldnum := 0; // we process one field per non-trivial format
for i := 0; i <= end; {
- c, w := utf8.DecodeRuneInString(format[i:len(format)]);
+ c, w := utf8.DecodeRuneInString(format[i:]);
if c != '%' || i == end {
p.add(c);
i += w;
@@ -634,7 +634,7 @@
if i < end && format[i] == '.' {
p.fmt.prec, p.fmt.prec_present, i = parsenum(format, i+1, end)
}
- c, w = utf8.DecodeRuneInString(format[i:len(format)]);
+ c, w = utf8.DecodeRuneInString(format[i:]);
i += w;
// percent is special - absorbs no operand
if c == '%' {