summaryrefslogtreecommitdiff
path: root/src/pkg/syscall/errstr.go
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2009-11-09 21:23:52 -0800
committerRobert Griesemer <gri@golang.org>2009-11-09 21:23:52 -0800
commit9aad19327eb719775a874f8f18bb15958db1d471 (patch)
treec515081857e0b9ad897c6d35b0be64fe4c346688 /src/pkg/syscall/errstr.go
parent073e240233589933c43143c997247c33206bb066 (diff)
downloadgolang-9aad19327eb719775a874f8f18bb15958db1d471.tar.gz
- replaced gofmt expression formatting algorithm with
rsc's algorithm - applied gofmt -w misc src - partial CL (last chunk) R=rsc, r http://go/go-review/1024041
Diffstat (limited to 'src/pkg/syscall/errstr.go')
-rw-r--r--src/pkg/syscall/errstr.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pkg/syscall/errstr.go b/src/pkg/syscall/errstr.go
index c1935d5b2..136aea998 100644
--- a/src/pkg/syscall/errstr.go
+++ b/src/pkg/syscall/errstr.go
@@ -7,22 +7,22 @@ package syscall
func str(val int) string { // do it here rather than with fmt to avoid dependency
if val < 0 {
- return "-"+str(-val)
+ return "-" + str(-val)
}
var buf [32]byte; // big enough for int64
- i := len(buf)-1;
+ i := len(buf) - 1;
for val >= 10 {
buf[i] = byte(val%10 + '0');
i--;
val /= 10;
}
- buf[i] = byte(val+'0');
+ buf[i] = byte(val + '0');
return string(buf[i:len(buf)]);
}
func Errstr(errno int) string {
if errno < 0 || errno >= int(len(errors)) {
- return "error "+str(errno)
+ return "error " + str(errno)
}
return errors[errno];
}