summaryrefslogtreecommitdiff
path: root/src/pkg/syscall/errstr.go
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2009-11-05 10:55:57 -0800
committerRobert Griesemer <gri@golang.org>2009-11-05 10:55:57 -0800
commitc765b6e1210cafa9d77b42e7b0de71d6e2528296 (patch)
treedbad67480afc941e1b57ecf128eb5c0d20f208b5 /src/pkg/syscall/errstr.go
parent60e10e44053afa77c0c17376e03716f3b40a116d (diff)
downloadgolang-c765b6e1210cafa9d77b42e7b0de71d6e2528296.tar.gz
gofmt-ify syscall
(replacement for CL 1018053) R=r http://go/go-review/1017047
Diffstat (limited to 'src/pkg/syscall/errstr.go')
-rw-r--r--src/pkg/syscall/errstr.go13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/pkg/syscall/errstr.go b/src/pkg/syscall/errstr.go
index 12a2c0d62..f21e1d94e 100644
--- a/src/pkg/syscall/errstr.go
+++ b/src/pkg/syscall/errstr.go
@@ -5,25 +5,24 @@
package syscall
-func str(val int) string { // do it here rather than with fmt to avoid dependency
+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
+ var buf [32]byte; // big enough for int64
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]
+ return errors[errno];
}
-