Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(574)

Unified Diff: src/pkg/strconv/atoi.go

Issue 156115: code review 156115: gofmt -r 'α[β:len(α)] -> α[β:]' -w src/cmd src/pkg (Closed)
Patch Set: code review 156115: gofmt -r 'α[β:len(α)] -> α[β:]' -w src/cmd src/pkg Created 15 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/pkg/regexp/regexp.go ('k') | src/pkg/strconv/atoi_test.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pkg/strconv/atoi.go
===================================================================
--- a/src/pkg/strconv/atoi.go
+++ b/src/pkg/strconv/atoi.go
@@ -56,7 +56,7 @@
switch {
case s[0] == '0' && len(s) > 1 && (s[1] == 'x' || s[1] == 'X'):
b = 16;
- s = s[2:len(s)];
+ s = s[2:];
if len(s) < 1 {
err = os.EINVAL;
goto Error;
@@ -140,10 +140,10 @@
s0 := s;
neg := false;
if s[0] == '+' {
- s = s[1:len(s)]
+ s = s[1:]
} else if s[0] == '-' {
neg = true;
- s = s[1:len(s)];
+ s = s[1:];
}
// Convert unsigned and check range.
« no previous file with comments | « src/pkg/regexp/regexp.go ('k') | src/pkg/strconv/atoi_test.go » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b