summaryrefslogtreecommitdiff
path: root/src/pkg/patch/git.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/patch/git.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/patch/git.go')
-rw-r--r--src/pkg/patch/git.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pkg/patch/git.go b/src/pkg/patch/git.go
index f9335cc45..fd5d781a2 100644
--- a/src/pkg/patch/git.go
+++ b/src/pkg/patch/git.go
@@ -44,11 +44,11 @@ func (d *GITBinaryLiteral) Apply(old []byte) ([]byte, os.Error) {
func unhex(c byte) uint8 {
switch {
case '0' <= c && c <= '9':
- return c-'0'
+ return c - '0'
case 'a' <= c && c <= 'f':
- return c-'a'+10
+ return c - 'a' + 10
case 'A' <= c && c <= 'F':
- return c-'A'+10
+ return c - 'A' + 10
}
return 255;
}
@@ -61,7 +61,7 @@ func getHex(s []byte) (data []byte, rest []byte) {
n &^= 1; // Only take an even number of hex digits.
data = make([]byte, n/2);
for i := range data {
- data[i] = unhex(s[2*i])<<4 | unhex(s[2*i + 1])
+ data[i] = unhex(s[2*i])<<4 | unhex(s[2*i+1])
}
rest = s[n:len(s)];
return;