diff options
author | Robert Griesemer <gri@golang.org> | 2011-04-13 15:13:59 -0700 |
---|---|---|
committer | Robert Griesemer <gri@golang.org> | 2011-04-13 15:13:59 -0700 |
commit | a2e286828be99c658b30ecb3daccd1b3dbcedb0e (patch) | |
tree | 8ab98b272049fba049213a3fdfcb4e869be4a0d7 | |
parent | 179f0b8a0717567a7d57e65ec83e69371e12ea97 (diff) | |
download | go-a2e286828be99c658b30ecb3daccd1b3dbcedb0e.tar.gz go-a2e286828be99c658b30ecb3daccd1b3dbcedb0e.zip |
gofmt: gofmt -s -w src misc
R=r, bradfitzwork
CC=golang-dev
https://golang.org/cl/4406044
-rw-r--r-- | src/cmd/godoc/format.go | 2 | ||||
-rw-r--r-- | src/pkg/crypto/rsa/pkcs1v15.go | 8 | ||||
-rw-r--r-- | src/pkg/crypto/tls/common.go | 2 | ||||
-rw-r--r-- | src/pkg/crypto/tls/handshake_messages_test.go | 2 | ||||
-rwxr-xr-x | src/pkg/exp/eval/eval | bin | 0 -> 3500057 bytes | |||
-rw-r--r-- | src/pkg/hash/fnv/fnv_test.go | 2 | ||||
-rw-r--r-- | src/pkg/http/export_test.go | 2 | ||||
-rw-r--r-- | src/pkg/os/dir_plan9.go | 2 | ||||
-rw-r--r-- | src/pkg/syscall/exec_windows.go | 2 | ||||
-rw-r--r-- | src/pkg/syscall/syscall_plan9.go | 2 |
10 files changed, 12 insertions, 12 deletions
diff --git a/src/cmd/godoc/format.go b/src/cmd/godoc/format.go index 5d978fcf0e..7e64708467 100644 --- a/src/cmd/godoc/format.go +++ b/src/cmd/godoc/format.go @@ -292,7 +292,7 @@ func rangeSelection(str string) Selection { from, _ := strconv.Atoi(m[1]) to, _ := strconv.Atoi(m[2]) if from < to { - return makeSelection([][]int{[]int{from, to}}) + return makeSelection([][]int{{from, to}}) } } return nil diff --git a/src/pkg/crypto/rsa/pkcs1v15.go b/src/pkg/crypto/rsa/pkcs1v15.go index 9a7184127d..3defa62ea6 100644 --- a/src/pkg/crypto/rsa/pkcs1v15.go +++ b/src/pkg/crypto/rsa/pkcs1v15.go @@ -149,10 +149,10 @@ func nonZeroRandomBytes(s []byte, rand io.Reader) (err os.Error) { // precompute a prefix of the digest value that makes a valid ASN1 DER string // with the correct contents. var hashPrefixes = map[crypto.Hash][]byte{ - crypto.MD5: []byte{0x30, 0x20, 0x30, 0x0c, 0x06, 0x08, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x02, 0x05, 0x05, 0x00, 0x04, 0x10}, - crypto.SHA1: []byte{0x30, 0x21, 0x30, 0x09, 0x06, 0x05, 0x2b, 0x0e, 0x03, 0x02, 0x1a, 0x05, 0x00, 0x04, 0x14}, - crypto.SHA256: []byte{0x30, 0x31, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, 0x05, 0x00, 0x04, 0x20}, - crypto.SHA384: []byte{0x30, 0x41, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x02, 0x05, 0x00, 0x04, 0x30}, + crypto.MD5: {0x30, 0x20, 0x30, 0x0c, 0x06, 0x08, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x02, 0x05, 0x05, 0x00, 0x04, 0x10}, + crypto.SHA1: {0x30, 0x21, 0x30, 0x09, 0x06, 0x05, 0x2b, 0x0e, 0x03, 0x02, 0x1a, 0x05, 0x00, 0x04, 0x14}, + crypto.SHA256: {0x30, 0x31, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, 0x05, 0x00, 0x04, 0x20}, + crypto.SHA384: {0x30, 0x41, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x02, 0x05, 0x00, 0x04, 0x30}, crypto.SHA512: {0x30, 0x51, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x03, 0x05, 0x00, 0x04, 0x40}, crypto.MD5SHA1: {}, // A special TLS case which doesn't use an ASN1 prefix. crypto.RIPEMD160: {0x30, 0x20, 0x30, 0x08, 0x06, 0x06, 0x28, 0xcf, 0x06, 0x03, 0x00, 0x31, 0x04, 0x14}, diff --git a/src/pkg/crypto/tls/common.go b/src/pkg/crypto/tls/common.go index c779234394..fb2916ae05 100644 --- a/src/pkg/crypto/tls/common.go +++ b/src/pkg/crypto/tls/common.go @@ -255,7 +255,7 @@ var varDefaultCipherSuites []uint16 func initDefaultCipherSuites() { varDefaultCipherSuites = make([]uint16, len(cipherSuites)) i := 0 - for id, _ := range cipherSuites { + for id := range cipherSuites { varDefaultCipherSuites[i] = id i++ } diff --git a/src/pkg/crypto/tls/handshake_messages_test.go b/src/pkg/crypto/tls/handshake_messages_test.go index 0b93b89f1a..f5e94e269c 100644 --- a/src/pkg/crypto/tls/handshake_messages_test.go +++ b/src/pkg/crypto/tls/handshake_messages_test.go @@ -121,7 +121,7 @@ func (*clientHelloMsg) Generate(rand *rand.Rand, size int) reflect.Value { m.ocspStapling = rand.Intn(10) > 5 m.supportedPoints = randomBytes(rand.Intn(5)+1, rand) m.supportedCurves = make([]uint16, rand.Intn(5)+1) - for i, _ := range m.supportedCurves { + for i := range m.supportedCurves { m.supportedCurves[i] = uint16(rand.Intn(30000)) } diff --git a/src/pkg/exp/eval/eval b/src/pkg/exp/eval/eval Binary files differnew file mode 100755 index 0000000000..20231f2e2b --- /dev/null +++ b/src/pkg/exp/eval/eval diff --git a/src/pkg/hash/fnv/fnv_test.go b/src/pkg/hash/fnv/fnv_test.go index 3ea3fe6f12..429230c80b 100644 --- a/src/pkg/hash/fnv/fnv_test.go +++ b/src/pkg/hash/fnv/fnv_test.go @@ -154,7 +154,7 @@ func benchmark(b *testing.B, h hash.Hash) { b.ResetTimer() b.SetBytes(testDataSize) data := make([]byte, testDataSize) - for i, _ := range data { + for i := range data { data[i] = byte(i + 'a') } diff --git a/src/pkg/http/export_test.go b/src/pkg/http/export_test.go index a76b70760d..47c6877602 100644 --- a/src/pkg/http/export_test.go +++ b/src/pkg/http/export_test.go @@ -14,7 +14,7 @@ func (t *Transport) IdleConnKeysForTesting() (keys []string) { if t.idleConn == nil { return } - for key, _ := range t.idleConn { + for key := range t.idleConn { keys = append(keys, key) } return diff --git a/src/pkg/os/dir_plan9.go b/src/pkg/os/dir_plan9.go index a53c764e38..d9514191d7 100644 --- a/src/pkg/os/dir_plan9.go +++ b/src/pkg/os/dir_plan9.go @@ -74,7 +74,7 @@ func (file *File) Readdirnames(count int) (names []string, err Error) { names = make([]string, len(fi)) err = nil - for i, _ := range fi { + for i := range fi { names[i] = fi[i].Name } diff --git a/src/pkg/syscall/exec_windows.go b/src/pkg/syscall/exec_windows.go index 1fa224efea..aeee191dda 100644 --- a/src/pkg/syscall/exec_windows.go +++ b/src/pkg/syscall/exec_windows.go @@ -269,7 +269,7 @@ func StartProcess(argv0 string, argv []string, attr *ProcAttr) (pid, handle int, p, _ := GetCurrentProcess() fd := make([]int32, len(attr.Files)) - for i, _ := range attr.Files { + for i := range attr.Files { if attr.Files[i] > 0 { err := DuplicateHandle(p, int32(attr.Files[i]), p, &fd[i], 0, true, DUPLICATE_SAME_ACCESS) if err != 0 { diff --git a/src/pkg/syscall/syscall_plan9.go b/src/pkg/syscall/syscall_plan9.go index b889940bfc..831cbddb24 100644 --- a/src/pkg/syscall/syscall_plan9.go +++ b/src/pkg/syscall/syscall_plan9.go @@ -52,7 +52,7 @@ func atoi(b []byte) (n uint) { } func cstring(s []byte) string { - for i, _ := range s { + for i := range s { if s[i] == 0 { return string(s[0:i]) } |