]> Cypherpunks repositories - gostls13.git/commitdiff
gofmt: experiment: align values in map composites where possible
authorRobert Griesemer <gri@golang.org>
Tue, 2 Mar 2010 21:46:51 +0000 (13:46 -0800)
committerRobert Griesemer <gri@golang.org>
Tue, 2 Mar 2010 21:46:51 +0000 (13:46 -0800)
- gofmt -w src misc
- looking for feedback

R=rsc, r
CC=golang-dev
https://golang.org/cl/223076

72 files changed:
src/cmd/cgo/ast.go
src/cmd/cgo/gcc.go
src/cmd/cgo/main.go
src/cmd/godoc/godoc.go
src/cmd/godoc/index.go
src/pkg/archive/tar/reader_test.go
src/pkg/archive/tar/writer_test.go
src/pkg/asn1/marshal.go
src/pkg/big/int_test.go
src/pkg/compress/flate/huffman_bit_writer.go
src/pkg/compress/flate/huffman_code.go
src/pkg/crypto/tls/handshake_client.go
src/pkg/crypto/x509/x509.go
src/pkg/crypto/x509/x509_test.go
src/pkg/debug/dwarf/const.go
src/pkg/debug/dwarf/entry.go
src/pkg/debug/dwarf/open.go
src/pkg/debug/dwarf/type_test.go
src/pkg/debug/elf/file.go
src/pkg/debug/proc/proc_linux.go
src/pkg/encoding/pem/pem.go
src/pkg/exp/eval/compiler.go
src/pkg/exp/eval/expr.go
src/pkg/exp/eval/gen.go
src/pkg/exp/eval/scope.go
src/pkg/exp/eval/stmt.go
src/pkg/exp/eval/world.go
src/pkg/exp/nacl/srpc/client.go
src/pkg/exp/nacl/srpc/msg.go
src/pkg/exp/ogle/process.go
src/pkg/exp/ogle/rruntime.go
src/pkg/exp/spacewar/spacewar.go
src/pkg/go/printer/nodes.go
src/pkg/go/printer/testdata/declarations.golden
src/pkg/go/printer/testdata/declarations.input
src/pkg/go/printer/testdata/linebreaks.golden
src/pkg/go/token/token.go
src/pkg/gob/codec_test.go
src/pkg/gob/decode.go
src/pkg/gob/encode.go
src/pkg/http/lex_test.go
src/pkg/http/readrequest_test.go
src/pkg/http/request.go
src/pkg/http/request_test.go
src/pkg/http/requestwrite_test.go
src/pkg/http/response.go
src/pkg/http/response_test.go
src/pkg/http/responsewrite_test.go
src/pkg/http/status.go
src/pkg/mime/mime_test.go
src/pkg/mime/type.go
src/pkg/net/dnsmsg.go
src/pkg/net/fd.go
src/pkg/netchan/export.go
src/pkg/reflect/value.go
src/pkg/scanner/scanner.go
src/pkg/syscall/zerrors_darwin_386.go
src/pkg/syscall/zerrors_darwin_amd64.go
src/pkg/syscall/zerrors_freebsd_386.go
src/pkg/syscall/zerrors_freebsd_amd64.go
src/pkg/syscall/zerrors_linux_386.go
src/pkg/syscall/zerrors_linux_amd64.go
src/pkg/syscall/zerrors_linux_arm.go
src/pkg/syscall/zerrors_nacl_386.go
src/pkg/template/template.go
src/pkg/template/template_test.go
src/pkg/unicode/tables.go
src/pkg/xgb/xgb.go
src/pkg/xgb/xproto.go
src/pkg/xml/read_test.go
src/pkg/xml/xml.go
src/pkg/xml/xml_test.go

index d6bcdb4879f8ab66e8a7687736d3575ce267d91c..1bde1b77bbedb495a1ebc2302baeffce50e2cdda 100644 (file)
@@ -145,8 +145,8 @@ func walk(x interface{}, p *Prog, context string) {
                                }
                                p.Crefs = p.Crefs[0 : i+1]
                                p.Crefs[i] = &Cref{
-                                       Name: sel.Sel.Name(),
-                                       Expr: n,
+                                       Name:    sel.Sel.Name(),
+                                       Expr:    n,
                                        Context: context,
                                }
                                break
index d8f35e128abe66cd5b15551d5297be938e0ca41a..bd64f0cb4b5d5db478a3f21f07e4adb71c7fa002 100644 (file)
@@ -389,14 +389,14 @@ func base(dt dwarf.Type) dwarf.Type {
 
 // Map from dwarf text names to aliases we use in package "C".
 var cnameMap = map[string]string{
-       "long int": "long",
-       "long unsigned int": "ulong",
-       "unsigned int": "uint",
-       "short unsigned int": "ushort",
-       "short int": "short",
-       "long long int": "longlong",
+       "long int":               "long",
+       "long unsigned int":      "ulong",
+       "unsigned int":           "uint",
+       "short unsigned int":     "ushort",
+       "short int":              "short",
+       "long long int":          "longlong",
        "long long unsigned int": "ulonglong",
-       "signed char": "schar",
+       "signed char":            "schar",
 }
 
 // Type returns a *Type with the same memory layout as
@@ -654,10 +654,10 @@ func (c *typeConv) FuncArg(dtype dwarf.Type) *Type {
                // Arrays are passed implicitly as pointers in C.
                // In Go, we must be explicit.
                return &Type{
-                       Size: c.ptrSize,
+                       Size:  c.ptrSize,
                        Align: c.ptrSize,
-                       Go: &ast.StarExpr{X: t.Go},
-                       C: t.C + "*",
+                       Go:    &ast.StarExpr{X: t.Go},
+                       C:     t.C + "*",
                }
        case *dwarf.TypedefType:
                // C has much more relaxed rules than Go for
@@ -703,7 +703,7 @@ func (c *typeConv) FuncType(dtype *dwarf.FuncType) *FuncType {
                Params: p,
                Result: r,
                Go: &ast.FuncType{
-                       Params: &ast.FieldList{List: gp},
+                       Params:  &ast.FieldList{List: gp},
                        Results: &ast.FieldList{List: gr},
                },
        }
@@ -723,7 +723,7 @@ func (c *typeConv) Opaque(n int64) ast.Expr {
 // Expr for integer n.
 func (c *typeConv) intExpr(n int64) ast.Expr {
        return &ast.BasicLit{
-               Kind: token.INT,
+               Kind:  token.INT,
                Value: []byte(strconv.Itoa64(n)),
        }
 }
index b76492cec6516e303823ede9b823500f6d00f5d1..070146c9acb2e955c6c5b8a3a34db924eb7b604c 100644 (file)
@@ -20,18 +20,18 @@ import (
 func usage() { fmt.Fprint(os.Stderr, "usage: cgo [compiler options] file.go ...\n") }
 
 var ptrSizeMap = map[string]int64{
-       "386": 4,
+       "386":   4,
        "amd64": 8,
-       "arm": 4,
+       "arm":   4,
 }
 
 var expandName = map[string]string{
-       "schar": "signed char",
-       "uchar": "unsigned char",
-       "ushort": "unsigned short",
-       "uint": "unsigned int",
-       "ulong": "unsigned long",
-       "longlong": "long long",
+       "schar":     "signed char",
+       "uchar":     "unsigned char",
+       "ushort":    "unsigned short",
+       "uint":      "unsigned int",
+       "ulong":     "unsigned long",
+       "longlong":  "long long",
        "ulonglong": "unsigned long long",
 }
 
index c6438245eb36344bea101f31fa9f2ff335454200..5b85af870086395f1d9d3916a2a91ed05ab6320c 100644 (file)
@@ -689,13 +689,13 @@ func urlFmt(w io.Writer, x interface{}, format string) {
 // The strings in infoKinds must be properly html-escaped.
 var infoKinds = [nKinds]string{
        PackageClause: "package&nbsp;clause",
-       ImportDecl: "import&nbsp;decl",
-       ConstDecl: "const&nbsp;decl",
-       TypeDecl: "type&nbsp;decl",
-       VarDecl: "var&nbsp;decl",
-       FuncDecl: "func&nbsp;decl",
-       MethodDecl: "method&nbsp;decl",
-       Use: "use",
+       ImportDecl:    "import&nbsp;decl",
+       ConstDecl:     "const&nbsp;decl",
+       TypeDecl:      "type&nbsp;decl",
+       VarDecl:       "var&nbsp;decl",
+       FuncDecl:      "func&nbsp;decl",
+       MethodDecl:    "method&nbsp;decl",
+       Use:           "use",
 }
 
 
@@ -762,20 +762,20 @@ func localnameFmt(w io.Writer, x interface{}, format string) {
 
 
 var fmap = template.FormatterMap{
-       "": textFmt,
-       "html": htmlFmt,
-       "html-esc": htmlEscFmt,
+       "":             textFmt,
+       "html":         htmlFmt,
+       "html-esc":     htmlEscFmt,
        "html-comment": htmlCommentFmt,
-       "url-pkg": urlFmt,
-       "url-src": urlFmt,
-       "url-pos": urlFmt,
-       "infoKind": infoKindFmt,
-       "infoLine": infoLineFmt,
-       "infoSnippet": infoSnippetFmt,
-       "padding": paddingFmt,
-       "time": timeFmt,
-       "dir/": dirslashFmt,
-       "localname": localnameFmt,
+       "url-pkg":      urlFmt,
+       "url-src":      urlFmt,
+       "url-pos":      urlFmt,
+       "infoKind":     infoKindFmt,
+       "infoLine":     infoLineFmt,
+       "infoSnippet":  infoSnippetFmt,
+       "padding":      paddingFmt,
+       "time":         timeFmt,
+       "dir/":         dirslashFmt,
+       "localname":    localnameFmt,
 }
 
 
@@ -828,12 +828,12 @@ func servePage(c *http.Conn, title, query string, content []byte) {
 
        _, ts := fsTree.get()
        d := Data{
-               Title: title,
-               PkgRoots: fsMap.PrefixList(),
+               Title:     title,
+               PkgRoots:  fsMap.PrefixList(),
                Timestamp: uint64(ts) * 1e9, // timestamp in ns
-               Query: query,
-               Menu: nil,
-               Content: content,
+               Query:     query,
+               Menu:      nil,
+               Content:   content,
        }
 
        if err := godocHTML.Execute(&d, c); err != nil {
@@ -935,7 +935,7 @@ func redirect(c *http.Conn, r *http.Request) (redirected bool) {
 // textExt[x] is true if the extension x indicates a text file, and false otherwise.
 var textExt = map[string]bool{
        ".css": false, // must be served raw
-       ".js": false,  // must be served raw
+       ".js":  false, // must be served raw
 }
 
 
index 01ec298781e7c6dc17b10ecb87615737f9272e28..d6fdba15dea4de5f9cfb8624c32db83e35112ce0 100644 (file)
@@ -647,7 +647,7 @@ func NewIndex(root string) *Index {
                decls := reduce(&h.Decls)
                others := reduce(&h.Others)
                words[w] = &LookupResult{
-                       Decls: decls,
+                       Decls:  decls,
                        Others: others,
                }
                wlist.Push(&wordPair{canonical(w), w})
index 88eee113900fdaae4a58d5c5a9bf6006bef91b3f..cfc25850776fbb825cfd239a4189c2b13f04917d 100644 (file)
@@ -24,26 +24,26 @@ var gnuTarTest = &untarTest{
        file: "testdata/gnu.tar",
        headers: []*Header{
                &Header{
-                       Name: "small.txt",
-                       Mode: 0640,
-                       Uid: 73025,
-                       Gid: 5000,
-                       Size: 5,
-                       Mtime: 1244428340,
+                       Name:     "small.txt",
+                       Mode:     0640,
+                       Uid:      73025,
+                       Gid:      5000,
+                       Size:     5,
+                       Mtime:    1244428340,
                        Typeflag: '0',
-                       Uname: "dsymonds",
-                       Gname: "eng",
+                       Uname:    "dsymonds",
+                       Gname:    "eng",
                },
                &Header{
-                       Name: "small2.txt",
-                       Mode: 0640,
-                       Uid: 73025,
-                       Gid: 5000,
-                       Size: 11,
-                       Mtime: 1244436044,
+                       Name:     "small2.txt",
+                       Mode:     0640,
+                       Uid:      73025,
+                       Gid:      5000,
+                       Size:     11,
+                       Mtime:    1244436044,
                        Typeflag: '0',
-                       Uname: "dsymonds",
-                       Gname: "eng",
+                       Uname:    "dsymonds",
+                       Gname:    "eng",
                },
        },
        cksums: []string{
@@ -58,30 +58,30 @@ var untarTests = []*untarTest{
                file: "testdata/star.tar",
                headers: []*Header{
                        &Header{
-                               Name: "small.txt",
-                               Mode: 0640,
-                               Uid: 73025,
-                               Gid: 5000,
-                               Size: 5,
-                               Mtime: 1244592783,
+                               Name:     "small.txt",
+                               Mode:     0640,
+                               Uid:      73025,
+                               Gid:      5000,
+                               Size:     5,
+                               Mtime:    1244592783,
                                Typeflag: '0',
-                               Uname: "dsymonds",
-                               Gname: "eng",
-                               Atime: 1244592783,
-                               Ctime: 1244592783,
+                               Uname:    "dsymonds",
+                               Gname:    "eng",
+                               Atime:    1244592783,
+                               Ctime:    1244592783,
                        },
                        &Header{
-                               Name: "small2.txt",
-                               Mode: 0640,
-                               Uid: 73025,
-                               Gid: 5000,
-                               Size: 11,
-                               Mtime: 1244592783,
+                               Name:     "small2.txt",
+                               Mode:     0640,
+                               Uid:      73025,
+                               Gid:      5000,
+                               Size:     11,
+                               Mtime:    1244592783,
                                Typeflag: '0',
-                               Uname: "dsymonds",
-                               Gname: "eng",
-                               Atime: 1244592783,
-                               Ctime: 1244592783,
+                               Uname:    "dsymonds",
+                               Gname:    "eng",
+                               Atime:    1244592783,
+                               Ctime:    1244592783,
                        },
                },
        },
@@ -89,21 +89,21 @@ var untarTests = []*untarTest{
                file: "testdata/v7.tar",
                headers: []*Header{
                        &Header{
-                               Name: "small.txt",
-                               Mode: 0444,
-                               Uid: 73025,
-                               Gid: 5000,
-                               Size: 5,
-                               Mtime: 1244593104,
+                               Name:     "small.txt",
+                               Mode:     0444,
+                               Uid:      73025,
+                               Gid:      5000,
+                               Size:     5,
+                               Mtime:    1244593104,
                                Typeflag: '\x00',
                        },
                        &Header{
-                               Name: "small2.txt",
-                               Mode: 0444,
-                               Uid: 73025,
-                               Gid: 5000,
-                               Size: 11,
-                               Mtime: 1244593104,
+                               Name:     "small2.txt",
+                               Mode:     0444,
+                               Uid:      73025,
+                               Gid:      5000,
+                               Size:     11,
+                               Mtime:    1244593104,
                                Typeflag: '\x00',
                        },
                },
index f060efcbedaee4be4f87d63373ebf55e3c5f3bc1..24db9b821bedf4c2cb46d9596e0af198bfa89142 100644 (file)
@@ -29,29 +29,29 @@ var writerTests = []*writerTest{
                entries: []*writerTestEntry{
                        &writerTestEntry{
                                header: &Header{
-                                       Name: "small.txt",
-                                       Mode: 0640,
-                                       Uid: 73025,
-                                       Gid: 5000,
-                                       Size: 5,
-                                       Mtime: 1246508266,
+                                       Name:     "small.txt",
+                                       Mode:     0640,
+                                       Uid:      73025,
+                                       Gid:      5000,
+                                       Size:     5,
+                                       Mtime:    1246508266,
                                        Typeflag: '0',
-                                       Uname: "dsymonds",
-                                       Gname: "eng",
+                                       Uname:    "dsymonds",
+                                       Gname:    "eng",
                                },
                                contents: "Kilts",
                        },
                        &writerTestEntry{
                                header: &Header{
-                                       Name: "small2.txt",
-                                       Mode: 0640,
-                                       Uid: 73025,
-                                       Gid: 5000,
-                                       Size: 11,
-                                       Mtime: 1245217492,
+                                       Name:     "small2.txt",
+                                       Mode:     0640,
+                                       Uid:      73025,
+                                       Gid:      5000,
+                                       Size:     11,
+                                       Mtime:    1245217492,
                                        Typeflag: '0',
-                                       Uname: "dsymonds",
-                                       Gname: "eng",
+                                       Uname:    "dsymonds",
+                                       Gname:    "eng",
                                },
                                contents: "Google.com\n",
                        },
@@ -65,15 +65,15 @@ var writerTests = []*writerTest{
                entries: []*writerTestEntry{
                        &writerTestEntry{
                                header: &Header{
-                                       Name: "tmp/16gig.txt",
-                                       Mode: 0640,
-                                       Uid: 73025,
-                                       Gid: 5000,
-                                       Size: 16 << 30,
-                                       Mtime: 1254699560,
+                                       Name:     "tmp/16gig.txt",
+                                       Mode:     0640,
+                                       Uid:      73025,
+                                       Gid:      5000,
+                                       Size:     16 << 30,
+                                       Mtime:    1254699560,
                                        Typeflag: '0',
-                                       Uname: "dsymonds",
-                                       Gname: "eng",
+                                       Uname:    "dsymonds",
+                                       Gname:    "eng",
                                },
                                // no contents
                        },
index a8a1fb6986bd2b1297ac26a804494e9f4c2ebcba..5704fafe1374baf0ff33a504eb931419e665022f 100644 (file)
@@ -470,9 +470,9 @@ func marshalField(out *forkableWriter, v reflect.Value, params fieldParameters)
 
        if params.explicit {
                err = marshalTagAndLength(explicitTag, tagAndLength{
-                       class: classContextSpecific,
-                       tag: *params.tag,
-                       length: bodyLen + tags.Len(),
+                       class:      classContextSpecific,
+                       tag:        *params.tag,
+                       length:     bodyLen + tags.Len(),
                        isCompound: true,
                })
        }
index c178bab770f6a65b6bdc6a412b361b79fc7ef729..7267adb287d6516a72d91de24d25199658c66f96 100644 (file)
@@ -94,9 +94,9 @@ func TestProdZZ(t *testing.T) {
 
 
 var facts = map[int]string{
-       0: "1",
-       1: "1",
-       2: "2",
+       0:  "1",
+       1:  "1",
+       2:  "2",
        10: "3628800",
        20: "2432902008176640000",
        100: "933262154439441526816992388562667004907159682643816214685929" +
index eac196dfcd0f558d10f8aa94ad290da5a02e2ff0..c2b044efdbb2f1df989cb3c07da8b89900cd90b4 100644 (file)
@@ -98,13 +98,13 @@ type WrongValueError struct {
 
 func newHuffmanBitWriter(w io.Writer) *huffmanBitWriter {
        return &huffmanBitWriter{
-               w: w,
-               literalFreq: make([]int32, maxLit),
-               offsetFreq: make([]int32, extendedOffsetCodeCount),
-               codegen: make([]uint8, maxLit+extendedOffsetCodeCount+1),
-               codegenFreq: make([]int32, codegenCodeCount),
+               w:               w,
+               literalFreq:     make([]int32, maxLit),
+               offsetFreq:      make([]int32, extendedOffsetCodeCount),
+               codegen:         make([]uint8, maxLit+extendedOffsetCodeCount+1),
+               codegenFreq:     make([]int32, codegenCodeCount),
                literalEncoding: newHuffmanEncoder(maxLit),
-               offsetEncoding: newHuffmanEncoder(extendedOffsetCodeCount),
+               offsetEncoding:  newHuffmanEncoder(extendedOffsetCodeCount),
                codegenEncoding: newHuffmanEncoder(codegenCodeCount),
        }
 }
index 94ff2dfb8bc816f5e82298da4d53d09bf05afbd8..38cbf439688dbfcea855756c52c43f552b896e17 100644 (file)
@@ -207,11 +207,11 @@ func (h *huffmanEncoder) bitCounts(list []literalNode, maxBits int32) []int32 {
                // For every level, the first two items are the first two characters.
                // We initialize the levels as if we had already figured this out.
                top = &levelInfo{
-                       level: level,
-                       lastChain: chain2,
+                       level:        level,
+                       lastChain:    chain2,
                        nextCharFreq: list[2].freq,
                        nextPairFreq: list[0].freq + list[1].freq,
-                       down: top,
+                       down:         top,
                }
                top.down.up = top
                if level == 1 {
index d07e2d89f6a3e4d53461ea09fb61ef2de936a74c..8cc6b7409c4fa2559579c7ed1086774274944e99 100644 (file)
@@ -34,11 +34,11 @@ func (h *clientHandshake) loop(writeChan chan<- interface{}, controlChan chan<-
        finishedHash := newFinishedHash()
 
        hello := &clientHelloMsg{
-               major: defaultMajor,
-               minor: defaultMinor,
-               cipherSuites: []uint16{TLS_RSA_WITH_RC4_128_SHA},
+               major:              defaultMajor,
+               minor:              defaultMinor,
+               cipherSuites:       []uint16{TLS_RSA_WITH_RC4_128_SHA},
                compressionMethods: []uint8{compressionNone},
-               random: make([]byte, 32),
+               random:             make([]byte, 32),
        }
 
        currentTime := uint32(config.Time())
index 5b526de4d9d0bb089bf4b75368f66d5059696c7a..886a5e7dc9fba282e1e4623355cfe7039dfffeee 100644 (file)
@@ -74,11 +74,11 @@ func ParsePKCS1PrivateKey(der []byte) (key *rsa.PrivateKey, err os.Error) {
 func MarshalPKCS1PrivateKey(key *rsa.PrivateKey) []byte {
        priv := pkcs1PrivateKey{
                Version: 1,
-               N: asn1.RawValue{Tag: 2, Bytes: key.PublicKey.N.Bytes()},
-               E: key.PublicKey.E,
-               D: asn1.RawValue{Tag: 2, Bytes: key.D.Bytes()},
-               P: asn1.RawValue{Tag: 2, Bytes: key.P.Bytes()},
-               Q: asn1.RawValue{Tag: 2, Bytes: key.Q.Bytes()},
+               N:       asn1.RawValue{Tag: 2, Bytes: key.PublicKey.N.Bytes()},
+               E:       key.PublicKey.E,
+               D:       asn1.RawValue{Tag: 2, Bytes: key.D.Bytes()},
+               P:       asn1.RawValue{Tag: 2, Bytes: key.P.Bytes()},
+               Q:       asn1.RawValue{Tag: 2, Bytes: key.Q.Bytes()},
        }
 
        b, _ := asn1.MarshalToMemory(priv)
@@ -787,9 +787,9 @@ func CreateCertificate(rand io.Reader, template, parent *Certificate, priv *rsa.
                Version: 3,
                SerialNumber: asn1.RawValue{Bytes: template.SerialNumber, Tag: 2},
                SignatureAlgorithm: algorithmIdentifier{oidSHA1WithRSA},
-               Issuer: parent.Subject.toRDNSequence(),
-               Validity: validity{template.NotBefore, template.NotAfter},
-               Subject: template.Subject.toRDNSequence(),
+               Issuer:             parent.Subject.toRDNSequence(),
+               Validity:           validity{template.NotBefore, template.NotAfter},
+               Subject:            template.Subject.toRDNSequence(),
                PublicKey: publicKeyInfo{algorithmIdentifier{oidRSA}, encodedPublicKey},
                Extensions: extensions,
        }
index e0ae37736e62bd159996c028a5977bb7a5f382d3..85e9e1bc835332eff22242f706fd67e96a781c2e 100644 (file)
@@ -160,18 +160,18 @@ func TestCreateSelfSignedCertificate(t *testing.T) {
        template := Certificate{
                SerialNumber: []byte{1},
                Subject: Name{
-                       CommonName: "test.example.com",
+                       CommonName:   "test.example.com",
                        Organization: "Acme Co",
                },
                NotBefore: time.SecondsToUTC(1000),
-               NotAfter: time.SecondsToUTC(100000),
+               NotAfter:  time.SecondsToUTC(100000),
 
                SubjectKeyId: []byte{1, 2, 3, 4},
-               KeyUsage: KeyUsageCertSign,
+               KeyUsage:     KeyUsageCertSign,
 
                BasicConstraintsValid: true,
-               IsCA: true,
-               DNSNames: []string{"test.example.com"},
+               IsCA:                  true,
+               DNSNames:              []string{"test.example.com"},
        }
 
        derBytes, err := CreateCertificate(urandom, &template, &template, priv)
index d73480cb2083299bca35127650e09a7039b187db..1a3fec155c2e08d37340e33ae8cf980e53a02c20 100644 (file)
@@ -87,78 +87,78 @@ const (
 )
 
 var attrNames = [...]string{
-       AttrSibling: "Sibling",
-       AttrLocation: "Location",
-       AttrName: "Name",
-       AttrOrdering: "Ordering",
-       AttrByteSize: "ByteSize",
-       AttrBitOffset: "BitOffset",
-       AttrBitSize: "BitSize",
-       AttrStmtList: "StmtList",
-       AttrLowpc: "Lowpc",
-       AttrHighpc: "Highpc",
-       AttrLanguage: "Language",
-       AttrDiscr: "Discr",
-       AttrDiscrValue: "DiscrValue",
-       AttrVisibility: "Visibility",
-       AttrImport: "Import",
-       AttrStringLength: "StringLength",
-       AttrCommonRef: "CommonRef",
-       AttrCompDir: "CompDir",
-       AttrConstValue: "ConstValue",
+       AttrSibling:        "Sibling",
+       AttrLocation:       "Location",
+       AttrName:           "Name",
+       AttrOrdering:       "Ordering",
+       AttrByteSize:       "ByteSize",
+       AttrBitOffset:      "BitOffset",
+       AttrBitSize:        "BitSize",
+       AttrStmtList:       "StmtList",
+       AttrLowpc:          "Lowpc",
+       AttrHighpc:         "Highpc",
+       AttrLanguage:       "Language",
+       AttrDiscr:          "Discr",
+       AttrDiscrValue:     "DiscrValue",
+       AttrVisibility:     "Visibility",
+       AttrImport:         "Import",
+       AttrStringLength:   "StringLength",
+       AttrCommonRef:      "CommonRef",
+       AttrCompDir:        "CompDir",
+       AttrConstValue:     "ConstValue",
        AttrContainingType: "ContainingType",
-       AttrDefaultValue: "DefaultValue",
-       AttrInline: "Inline",
-       AttrIsOptional: "IsOptional",
-       AttrLowerBound: "LowerBound",
-       AttrProducer: "Producer",
-       AttrPrototyped: "Prototyped",
-       AttrReturnAddr: "ReturnAddr",
-       AttrStartScope: "StartScope",
-       AttrStrideSize: "StrideSize",
-       AttrUpperBound: "UpperBound",
+       AttrDefaultValue:   "DefaultValue",
+       AttrInline:         "Inline",
+       AttrIsOptional:     "IsOptional",
+       AttrLowerBound:     "LowerBound",
+       AttrProducer:       "Producer",
+       AttrPrototyped:     "Prototyped",
+       AttrReturnAddr:     "ReturnAddr",
+       AttrStartScope:     "StartScope",
+       AttrStrideSize:     "StrideSize",
+       AttrUpperBound:     "UpperBound",
        AttrAbstractOrigin: "AbstractOrigin",
-       AttrAccessibility: "Accessibility",
-       AttrAddrClass: "AddrClass",
-       AttrArtificial: "Artificial",
-       AttrBaseTypes: "BaseTypes",
-       AttrCalling: "Calling",
-       AttrCount: "Count",
-       AttrDataMemberLoc: "DataMemberLoc",
-       AttrDeclColumn: "DeclColumn",
-       AttrDeclFile: "DeclFile",
-       AttrDeclLine: "DeclLine",
-       AttrDeclaration: "Declaration",
-       AttrDiscrList: "DiscrList",
-       AttrEncoding: "Encoding",
-       AttrExternal: "External",
-       AttrFrameBase: "FrameBase",
-       AttrFriend: "Friend",
+       AttrAccessibility:  "Accessibility",
+       AttrAddrClass:      "AddrClass",
+       AttrArtificial:     "Artificial",
+       AttrBaseTypes:      "BaseTypes",
+       AttrCalling:        "Calling",
+       AttrCount:          "Count",
+       AttrDataMemberLoc:  "DataMemberLoc",
+       AttrDeclColumn:     "DeclColumn",
+       AttrDeclFile:       "DeclFile",
+       AttrDeclLine:       "DeclLine",
+       AttrDeclaration:    "Declaration",
+       AttrDiscrList:      "DiscrList",
+       AttrEncoding:       "Encoding",
+       AttrExternal:       "External",
+       AttrFrameBase:      "FrameBase",
+       AttrFriend:         "Friend",
        AttrIdentifierCase: "IdentifierCase",
-       AttrMacroInfo: "MacroInfo",
-       AttrNamelistItem: "NamelistItem",
-       AttrPriority: "Priority",
-       AttrSegment: "Segment",
-       AttrSpecification: "Specification",
-       AttrStaticLink: "StaticLink",
-       AttrType: "Type",
-       AttrUseLocation: "UseLocation",
-       AttrVarParam: "VarParam",
-       AttrVirtuality: "Virtuality",
-       AttrVtableElemLoc: "VtableElemLoc",
-       AttrAllocated: "Allocated",
-       AttrAssociated: "Associated",
-       AttrDataLocation: "DataLocation",
-       AttrStride: "Stride",
-       AttrEntrypc: "Entrypc",
-       AttrUseUTF8: "UseUTF8",
-       AttrExtension: "Extension",
-       AttrRanges: "Ranges",
-       AttrTrampoline: "Trampoline",
-       AttrCallColumn: "CallColumn",
-       AttrCallFile: "CallFile",
-       AttrCallLine: "CallLine",
-       AttrDescription: "Description",
+       AttrMacroInfo:      "MacroInfo",
+       AttrNamelistItem:   "NamelistItem",
+       AttrPriority:       "Priority",
+       AttrSegment:        "Segment",
+       AttrSpecification:  "Specification",
+       AttrStaticLink:     "StaticLink",
+       AttrType:           "Type",
+       AttrUseLocation:    "UseLocation",
+       AttrVarParam:       "VarParam",
+       AttrVirtuality:     "Virtuality",
+       AttrVtableElemLoc:  "VtableElemLoc",
+       AttrAllocated:      "Allocated",
+       AttrAssociated:     "Associated",
+       AttrDataLocation:   "DataLocation",
+       AttrStride:         "Stride",
+       AttrEntrypc:        "Entrypc",
+       AttrUseUTF8:        "UseUTF8",
+       AttrExtension:      "Extension",
+       AttrRanges:         "Ranges",
+       AttrTrampoline:     "Trampoline",
+       AttrCallColumn:     "CallColumn",
+       AttrCallFile:       "CallFile",
+       AttrCallLine:       "CallLine",
+       AttrDescription:    "Description",
 }
 
 func (a Attr) String() string {
@@ -272,62 +272,62 @@ const (
 )
 
 var tagNames = [...]string{
-       TagArrayType: "ArrayType",
-       TagClassType: "ClassType",
-       TagEntryPoint: "EntryPoint",
-       TagEnumerationType: "EnumerationType",
-       TagFormalParameter: "FormalParameter",
-       TagImportedDeclaration: "ImportedDeclaration",
-       TagLabel: "Label",
-       TagLexDwarfBlock: "LexDwarfBlock",
-       TagMember: "Member",
-       TagPointerType: "PointerType",
-       TagReferenceType: "ReferenceType",
-       TagCompileUnit: "CompileUnit",
-       TagStringType: "StringType",
-       TagStructType: "StructType",
-       TagSubroutineType: "SubroutineType",
-       TagTypedef: "Typedef",
-       TagUnionType: "UnionType",
-       TagUnspecifiedParameters: "UnspecifiedParameters",
-       TagVariant: "Variant",
-       TagCommonDwarfBlock: "CommonDwarfBlock",
-       TagCommonInclusion: "CommonInclusion",
-       TagInheritance: "Inheritance",
-       TagInlinedSubroutine: "InlinedSubroutine",
-       TagModule: "Module",
-       TagPtrToMemberType: "PtrToMemberType",
-       TagSetType: "SetType",
-       TagSubrangeType: "SubrangeType",
-       TagWithStmt: "WithStmt",
-       TagAccessDeclaration: "AccessDeclaration",
-       TagBaseType: "BaseType",
-       TagCatchDwarfBlock: "CatchDwarfBlock",
-       TagConstType: "ConstType",
-       TagConstant: "Constant",
-       TagEnumerator: "Enumerator",
-       TagFileType: "FileType",
-       TagFriend: "Friend",
-       TagNamelist: "Namelist",
-       TagNamelistItem: "NamelistItem",
-       TagPackedType: "PackedType",
-       TagSubprogram: "Subprogram",
-       TagTemplateTypeParameter: "TemplateTypeParameter",
+       TagArrayType:              "ArrayType",
+       TagClassType:              "ClassType",
+       TagEntryPoint:             "EntryPoint",
+       TagEnumerationType:        "EnumerationType",
+       TagFormalParameter:        "FormalParameter",
+       TagImportedDeclaration:    "ImportedDeclaration",
+       TagLabel:                  "Label",
+       TagLexDwarfBlock:          "LexDwarfBlock",
+       TagMember:                 "Member",
+       TagPointerType:            "PointerType",
+       TagReferenceType:          "ReferenceType",
+       TagCompileUnit:            "CompileUnit",
+       TagStringType:             "StringType",
+       TagStructType:             "StructType",
+       TagSubroutineType:         "SubroutineType",
+       TagTypedef:                "Typedef",
+       TagUnionType:              "UnionType",
+       TagUnspecifiedParameters:  "UnspecifiedParameters",
+       TagVariant:                "Variant",
+       TagCommonDwarfBlock:       "CommonDwarfBlock",
+       TagCommonInclusion:        "CommonInclusion",
+       TagInheritance:            "Inheritance",
+       TagInlinedSubroutine:      "InlinedSubroutine",
+       TagModule:                 "Module",
+       TagPtrToMemberType:        "PtrToMemberType",
+       TagSetType:                "SetType",
+       TagSubrangeType:           "SubrangeType",
+       TagWithStmt:               "WithStmt",
+       TagAccessDeclaration:      "AccessDeclaration",
+       TagBaseType:               "BaseType",
+       TagCatchDwarfBlock:        "CatchDwarfBlock",
+       TagConstType:              "ConstType",
+       TagConstant:               "Constant",
+       TagEnumerator:             "Enumerator",
+       TagFileType:               "FileType",
+       TagFriend:                 "Friend",
+       TagNamelist:               "Namelist",
+       TagNamelistItem:           "NamelistItem",
+       TagPackedType:             "PackedType",
+       TagSubprogram:             "Subprogram",
+       TagTemplateTypeParameter:  "TemplateTypeParameter",
        TagTemplateValueParameter: "TemplateValueParameter",
-       TagThrownType: "ThrownType",
-       TagTryDwarfBlock: "TryDwarfBlock",
-       TagVariantPart: "VariantPart",
-       TagVariable: "Variable",
-       TagVolatileType: "VolatileType",
-       TagDwarfProcedure: "DwarfProcedure",
-       TagRestrictType: "RestrictType",
-       TagInterfaceType: "InterfaceType",
-       TagNamespace: "Namespace",
-       TagImportedModule: "ImportedModule",
-       TagUnspecifiedType: "UnspecifiedType",
-       TagPartialUnit: "PartialUnit",
-       TagImportedUnit: "ImportedUnit",
-       TagMutableType: "MutableType",
+       TagThrownType:             "ThrownType",
+       TagTryDwarfBlock:          "TryDwarfBlock",
+       TagVariantPart:            "VariantPart",
+       TagVariable:               "Variable",
+       TagVolatileType:           "VolatileType",
+       TagDwarfProcedure:         "DwarfProcedure",
+       TagRestrictType:           "RestrictType",
+       TagInterfaceType:          "InterfaceType",
+       TagNamespace:              "Namespace",
+       TagImportedModule:         "ImportedModule",
+       TagUnspecifiedType:        "UnspecifiedType",
+       TagPartialUnit:            "PartialUnit",
+       TagImportedUnit:           "ImportedUnit",
+       TagMutableType:            "MutableType",
 }
 
 func (t Tag) String() string {
index 5f739c426b3f22e3c701ecdcef05dce9dc87b55f..549e5c2cc70e5557e643dae92d27428d968161b5 100644 (file)
@@ -138,10 +138,10 @@ func (b *buf) entry(atab abbrevTable, ubase Offset) *Entry {
                return nil
        }
        e := &Entry{
-               Offset: off,
-               Tag: a.tag,
+               Offset:   off,
+               Tag:      a.tag,
                Children: a.children,
-               Field: make([]Field, len(a.field)),
+               Field:    make([]Field, len(a.field)),
        }
        for i := range e.Field {
                e.Field[i].Attr = a.field[i].attr
index 3a1b00311c716f9667301c6cae5dbdb5d5758fdf..3b50351d5375b0e368590a7d2390ec59e1d03ca7 100644 (file)
@@ -42,16 +42,16 @@ type Data struct {
 // the ".debug_abbrev" section.
 func New(abbrev, aranges, frame, info, line, pubnames, ranges, str []byte) (*Data, os.Error) {
        d := &Data{
-               abbrev: abbrev,
-               aranges: aranges,
-               frame: frame,
-               info: info,
-               line: line,
-               pubnames: pubnames,
-               ranges: ranges,
-               str: str,
+               abbrev:      abbrev,
+               aranges:     aranges,
+               frame:       frame,
+               info:        info,
+               line:        line,
+               pubnames:    pubnames,
+               ranges:      ranges,
+               str:         str,
                abbrevCache: make(map[uint32]abbrevTable),
-               typeCache: make(map[Offset]Type),
+               typeCache:   make(map[Offset]Type),
        }
 
        // Sniff .debug_info to figure out byte order.
index 2c5aabd397b25a9f8c0c400e1b9c5bfe6595548f..80241462b97fe9b7f24f650f45249da51d218883 100644 (file)
@@ -12,15 +12,15 @@ import (
 )
 
 var typedefTests = map[string]string{
-       "t_ptr_volatile_int": "*volatile int",
-       "t_ptr_const_char": "*const char",
-       "t_long": "long int",
-       "t_ushort": "short unsigned int",
-       "t_func_int_of_float_double": "func(float, double) int",
+       "t_ptr_volatile_int":             "*volatile int",
+       "t_ptr_const_char":               "*const char",
+       "t_long":                         "long int",
+       "t_ushort":                       "short unsigned int",
+       "t_func_int_of_float_double":     "func(float, double) int",
        "t_ptr_func_int_of_float_double": "*func(float, double) int",
        "t_func_ptr_int_of_char_schar_uchar": "func(char, signed char, unsigned char) *int",
-       "t_func_void_of_char": "func(char) void",
-       "t_func_void_of_void": "func() void",
+       "t_func_void_of_char":          "func(char) void",
+       "t_func_void_of_void":          "func() void",
        "t_func_void_of_ptr_char_dots": "func(*char, ...) void",
        "t_my_struct": "struct my_struct {vi volatile int@0; x char@4 : 1@7; y int@4 : 4@27; array [40]long long int@8}",
        "t_my_union": "union my_union {vi volatile int@0; x char@0 : 1@7; y int@0 : 4@28; array [40]long long int@0}",
index c7ef955e61a2ac42d705910412310b44aca995dc..a12febfe6b0c0b06aa00f8cba178fd4648f40ab3 100644 (file)
@@ -259,15 +259,15 @@ func NewFile(r io.ReaderAt) (*File, os.Error) {
                        }
                        names[i] = sh.Name
                        s.SectionHeader = SectionHeader{
-                               Type: SectionType(sh.Type),
-                               Flags: SectionFlag(sh.Flags),
-                               Addr: uint64(sh.Addr),
-                               Offset: uint64(sh.Off),
-                               Size: uint64(sh.Size),
-                               Link: uint32(sh.Link),
-                               Info: uint32(sh.Info),
+                               Type:      SectionType(sh.Type),
+                               Flags:     SectionFlag(sh.Flags),
+                               Addr:      uint64(sh.Addr),
+                               Offset:    uint64(sh.Off),
+                               Size:      uint64(sh.Size),
+                               Link:      uint32(sh.Link),
+                               Info:      uint32(sh.Info),
                                Addralign: uint64(sh.Addralign),
-                               Entsize: uint64(sh.Entsize),
+                               Entsize:   uint64(sh.Entsize),
                        }
                case ELFCLASS64:
                        sh := new(Section64)
@@ -276,15 +276,15 @@ func NewFile(r io.ReaderAt) (*File, os.Error) {
                        }
                        names[i] = sh.Name
                        s.SectionHeader = SectionHeader{
-                               Type: SectionType(sh.Type),
-                               Flags: SectionFlag(sh.Flags),
-                               Offset: uint64(sh.Off),
-                               Size: uint64(sh.Size),
-                               Addr: uint64(sh.Addr),
-                               Link: uint32(sh.Link),
-                               Info: uint32(sh.Info),
+                               Type:      SectionType(sh.Type),
+                               Flags:     SectionFlag(sh.Flags),
+                               Offset:    uint64(sh.Off),
+                               Size:      uint64(sh.Size),
+                               Addr:      uint64(sh.Addr),
+                               Link:      uint32(sh.Link),
+                               Info:      uint32(sh.Info),
                                Addralign: uint64(sh.Addralign),
-                               Entsize: uint64(sh.Entsize),
+                               Entsize:   uint64(sh.Entsize),
                        }
                }
                s.sr = io.NewSectionReader(r, int64(s.Offset), int64(s.Size))
index cdeba7c0e4dde3f316e8918e0df0c534b7756ce3..afe8bd9159294911344a1eec6dc77488ec97ad57 100644 (file)
@@ -1249,13 +1249,13 @@ func (p *process) attachAllThreads() os.Error {
 // newProcess creates a new process object and starts its monitor thread.
 func newProcess(pid int) *process {
        p := &process{
-               pid: pid,
-               threads: make(map[int]*thread),
-               breakpoints: make(map[uintptr]*breakpoint),
-               ready: make(chan bool, 1),
-               debugEvents: make(chan *debugEvent),
-               debugReqs: make(chan *debugReq),
-               stopReq: make(chan os.Error),
+               pid:                pid,
+               threads:            make(map[int]*thread),
+               breakpoints:        make(map[uintptr]*breakpoint),
+               ready:              make(chan bool, 1),
+               debugEvents:        make(chan *debugEvent),
+               debugReqs:          make(chan *debugReq),
+               stopReq:            make(chan os.Error),
                transitionHandlers: new(vector.Vector),
        }
 
index 359fe7d515c471522100e53801a3a511af32b651..f39540756bd8b9910a3c99a2b5d1e7bf62888b23 100644 (file)
@@ -92,7 +92,7 @@ func Decode(data []byte) (p *Block, rest []byte) {
 
        p = &Block{
                Headers: make(map[string]string),
-               Type: string(typeLine),
+               Type:    string(typeLine),
        }
 
        for {
index bf5a842e6e1cad315d7f10631c541630aecd2a43..3e37bfbaa5c13c7567cdb1b175d568723438697a 100644 (file)
@@ -39,9 +39,9 @@ func newUniverse() *Scope {
        sc := &Scope{nil, 0}
        sc.block = &block{
                offset: 0,
-               scope: sc,
+               scope:  sc,
                global: true,
-               defs: make(map[string]Def),
+               defs:   make(map[string]Def),
        }
        return sc
 }
index f875bb0052b17108c8249c38e6621fc5f6f71580..dcd02abc2c461ef4426b2b40093f30f20478a180 100644 (file)
@@ -249,10 +249,10 @@ type assignCompiler struct {
 // fail and these expressions given a nil type.
 func (a *compiler) checkAssign(pos token.Position, rs []*expr, errOp, errPosName string) (*assignCompiler, bool) {
        c := &assignCompiler{
-               compiler: a,
-               pos: pos,
-               rs: rs,
-               errOp: errOp,
+               compiler:   a,
+               pos:        pos,
+               rs:         rs,
+               errOp:      errOp,
                errPosName: errPosName,
        }
 
index 2acc2c9561ed8fb4f7fdf741f7059fe3f06f56cf..ea421ff9c419ad233f8a593722c439b1b471fa51 100644 (file)
@@ -103,14 +103,14 @@ var binOps = []Op{
        Op{Name: "Sub", Expr: "l - r", ConstExpr: "l.Sub(r)", Types: numbers},
        Op{Name: "Mul", Expr: "l * r", ConstExpr: "l.Mul(r)", Types: numbers},
        Op{Name: "Quo",
-               Body: "if r == 0 { t.Abort(DivByZeroError{}) } ret =  l / r",
+               Body:      "if r == 0 { t.Abort(DivByZeroError{}) } ret =  l / r",
                ConstExpr: "l.Quo(r)",
-               Types: numbers,
+               Types:     numbers,
        },
        Op{Name: "Rem",
-               Body: "if r == 0 { t.Abort(DivByZeroError{}) } ret = l % r",
+               Body:      "if r == 0 { t.Abort(DivByZeroError{}) } ret = l % r",
                ConstExpr: "l.Rem(r)",
-               Types: integers,
+               Types:     integers,
        },
        Op{Name: "And", Expr: "l & r", ConstExpr: "l.And(r)", Types: integers},
        Op{Name: "Or", Expr: "l | r", ConstExpr: "l.Or(r)", Types: integers},
index 84c4c92b8ccba09ac482952a216b603cf9a3579d..74ce32b594d45fb9efd48446fd9b3669eeeb50f8 100644 (file)
@@ -77,9 +77,9 @@ func (b *block) enterChild() *block {
                log.Crash("Failed to exit child block before entering another child")
        }
        sub := &block{
-               outer: b,
-               scope: b.scope,
-               defs: make(map[string]Def),
+               outer:  b,
+               scope:  b.scope,
+               defs:   make(map[string]Def),
                offset: b.offset + b.numVars,
        }
        b.inner = sub
index 75b934b3d846c648b7c9704740c6e0490d106fc8..07278edd598a17ccfd07574adb9e253161f179c5 100644 (file)
@@ -742,11 +742,11 @@ var assignOpToOp = map[token.Token]token.Token{
        token.QUO_ASSIGN: token.QUO,
        token.REM_ASSIGN: token.REM,
 
-       token.AND_ASSIGN: token.AND,
-       token.OR_ASSIGN: token.OR,
-       token.XOR_ASSIGN: token.XOR,
-       token.SHL_ASSIGN: token.SHL,
-       token.SHR_ASSIGN: token.SHR,
+       token.AND_ASSIGN:     token.AND,
+       token.OR_ASSIGN:      token.OR,
+       token.XOR_ASSIGN:     token.XOR,
+       token.SHL_ASSIGN:     token.SHL,
+       token.SHR_ASSIGN:     token.SHR,
        token.AND_NOT_ASSIGN: token.AND_NOT,
 }
 
@@ -1215,8 +1215,8 @@ func (a *blockCompiler) enterChild() *blockCompiler {
        block := a.block.enterChild()
        return &blockCompiler{
                funcCompiler: a.funcCompiler,
-               block: block,
-               parent: a,
+               block:        block,
+               parent:       a,
        }
 }
 
@@ -1252,15 +1252,15 @@ func (a *compiler) compileFunc(b *block, decl *FuncDecl, body *ast.BlockStmt) fu
        cb := newCodeBuf()
        fc := &funcCompiler{
                compiler: a,
-               fnType: decl.Type,
+               fnType:   decl.Type,
                outVarsNamed: len(decl.OutNames) > 0 && decl.OutNames[0] != nil,
                codeBuf: cb,
-               flow: newFlowBuf(cb),
-               labels: make(map[string]*label),
+               flow:    newFlowBuf(cb),
+               labels:  make(map[string]*label),
        }
        bc := &blockCompiler{
                funcCompiler: fc,
-               block: bodyScope.block,
+               block:        bodyScope.block,
        }
 
        // Compile body
index 1d19b50b627a437796c501b0cbc50808dc2fad07..edeb39a5f9b9b1ae07d0e1f7c84669d4c4bc0614 100644 (file)
@@ -51,16 +51,16 @@ func (w *World) CompileStmtList(stmts []ast.Stmt) (Code, os.Error) {
        cc := &compiler{errors, 0, 0}
        cb := newCodeBuf()
        fc := &funcCompiler{
-               compiler: cc,
-               fnType: nil,
+               compiler:     cc,
+               fnType:       nil,
                outVarsNamed: false,
-               codeBuf: cb,
-               flow: newFlowBuf(cb),
-               labels: make(map[string]*label),
+               codeBuf:      cb,
+               flow:         newFlowBuf(cb),
+               labels:       make(map[string]*label),
        }
        bc := &blockCompiler{
                funcCompiler: fc,
-               block: w.scope.block,
+               block:        w.scope.block,
        }
        nerr := cc.numError()
        for _, stmt := range stmts {
index 9e47376f81651f07f0eaedab012a273f8848e738..a17f8f9d7be93c25b6577c5014b8e9e36bb8c417 100644 (file)
@@ -52,9 +52,9 @@ func NewClient(fd int) (c *Client, err os.Error) {
        // service discovery request
        m := &msg{
                protocol: protocol,
-               isReq: true,
-               Ret: []interface{}{[]byte(nil)},
-               Size: []int{4000},
+               isReq:    true,
+               Ret:      []interface{}{[]byte(nil)},
+               Size:     []int{4000},
        }
        m.packRequest()
        c.s.send(m)
index 52f84b884f096ee4bc8ef8964154cb0d4c3e0c24..b08327ca645dcd1e0770cef28b7ade2e0a8246df 100644 (file)
@@ -34,19 +34,19 @@ const (
 )
 
 var errstr = [...]string{
-       OK - OK: "ok",
-       ErrBreak - OK: "break",
-       ErrMessageTruncated - OK: "message truncated",
-       ErrNoMemory - OK: "out of memory",
-       ErrProtocolMismatch - OK: "protocol mismatch",
-       ErrBadRPCNumber - OK: "invalid RPC method number",
-       ErrBadArgType - OK: "unexpected argument type",
-       ErrTooFewArgs - OK: "too few arguments",
-       ErrTooManyArgs - OK: "too many arguments",
-       ErrInArgTypeMismatch - OK: "input argument type mismatch",
+       OK - OK:                    "ok",
+       ErrBreak - OK:              "break",
+       ErrMessageTruncated - OK:   "message truncated",
+       ErrNoMemory - OK:           "out of memory",
+       ErrProtocolMismatch - OK:   "protocol mismatch",
+       ErrBadRPCNumber - OK:       "invalid RPC method number",
+       ErrBadArgType - OK:         "unexpected argument type",
+       ErrTooFewArgs - OK:         "too few arguments",
+       ErrTooManyArgs - OK:        "too many arguments",
+       ErrInArgTypeMismatch - OK:  "input argument type mismatch",
        ErrOutArgTypeMismatch - OK: "output argument type mismatch",
-       ErrInternalError - OK: "internal error",
-       ErrAppError - OK: "application error",
+       ErrInternalError - OK:      "internal error",
+       ErrAppError - OK:           "application error",
 }
 
 func (e Errno) String() string {
index 63f42a9d4ab56a3eab748667e47321dfb939dfbc..81e5c830de57dacab19e5b73c02a99493e2588e6 100644 (file)
@@ -106,14 +106,14 @@ type Process struct {
 // process, an architecture, and a symbol table.
 func NewProcess(tproc proc.Process, arch Arch, syms *gosym.Table) (*Process, os.Error) {
        p := &Process{
-               Arch: arch,
-               proc: tproc,
-               syms: syms,
-               types: make(map[proc.Word]*remoteType),
-               breakpointHooks: make(map[proc.Word]*breakpointHook),
+               Arch:                arch,
+               proc:                tproc,
+               syms:                syms,
+               types:               make(map[proc.Word]*remoteType),
+               breakpointHooks:     make(map[proc.Word]*breakpointHook),
                goroutineCreateHook: new(goroutineCreateHook),
-               goroutineExitHook: new(goroutineExitHook),
-               goroutines: make(map[proc.Word]*Goroutine),
+               goroutineExitHook:   new(goroutineExitHook),
+               goroutines:          make(map[proc.Word]*Goroutine),
        }
 
        // Fill in remote runtime
index b13344a5fd7668e9bb57a4ffd1b54c92c55f0cf2..e3bdcbe1f87c03de90b6f389c624db95dd4d3b00 100644 (file)
@@ -141,13 +141,13 @@ type rt1G struct {
 }
 
 var rt1GStatus = runtimeGStatus{
-       Gidle: 0,
+       Gidle:     0,
        Grunnable: 1,
-       Grunning: 2,
-       Gsyscall: 3,
-       Gwaiting: 4,
+       Grunning:  2,
+       Gsyscall:  3,
+       Gwaiting:  4,
        Gmoribund: 5,
-       Gdead: 6,
+       Gdead:     6,
 }
 
 // runtimeIndexes stores the indexes of fields in the runtime
index 93cbe84886281a3f31ccf84bb435fe5fb319b044..7333220ef53284f3b9686bbe2a708e54b8132070 100644 (file)
@@ -121,14 +121,14 @@ const (
 )
 
 var ctlBits = [...]pdp1.Word{
-       'f': 0000001,
-       'd': 0000002,
-       'a': 0000004,
-       's': 0000010,
+       'f':  0000001,
+       'd':  0000002,
+       'a':  0000004,
+       's':  0000010,
        '\'': 0040000,
-       ';': 0100000,
-       'k': 0200000,
-       'l': 0400000,
+       ';':  0100000,
+       'k':  0200000,
+       'l':  0400000,
 }
 
 func (m *SpacewarPDP1) Step() os.Error {
index b9b890016936131bf366b085751652ce3cb9be99..04b9610267db07937c8b094d490f79eb518e5656 100644 (file)
@@ -159,15 +159,17 @@ func (p *printer) exprList(prev token.Position, list []ast.Expr, depth int, mode
                ws = indent
        }
 
+       oneLiner := false // true if the previous expression fit on a single line
+       prevBreak := -1   // index of last expression that was followed by a linebreak
+
        // the first linebreak is always a formfeed since this section must not
        // depend on any previous formatting
        if prev.IsValid() && prev.Line < line && p.linebreak(line, 1, 2, ws, true) {
                ws = ignore
                *multiLine = true
+               prevBreak = 0
        }
 
-       oneLiner := false // true if the previous expression fit on a single line
-       prevBreak := 0    // index of last expression that was followed by a linebreak
        for i, x := range list {
                prev := line
                line = x.Pos().Line
@@ -189,12 +191,20 @@ func (p *printer) exprList(prev token.Position, list []ast.Expr, depth int, mode
                                p.print(blank)
                        }
                }
-               p.expr0(x, depth, multiLine)
                // determine if x satisfies the "one-liner" criteria
                // TODO(gri): determine if the multiline information returned
                //            from p.expr0 is precise enough so it could be
                //            used instead
                oneLiner = p.isOneLineExpr(x)
+               if t, isPair := x.(*ast.KeyValueExpr); isPair && oneLiner && len(list) > 1 {
+                       // we have a key:value expression that fits onto one line, and
+                       // is a list with more then one entry: align all the values
+                       p.expr(t.Key, multiLine)
+                       p.print(t.Colon, token.COLON, vtab)
+                       p.expr(t.Value, multiLine)
+               } else {
+                       p.expr0(x, depth, multiLine)
+               }
        }
 
        if mode&commaTerm != 0 && next.IsValid() && p.pos.Line < next.Line {
index beb110d87d3d9d034e0050d48c45cb5344aa2774..ef93eb9657b144a66bd4dfc80fed67a8021186f9 100644 (file)
@@ -462,45 +462,57 @@ func _() {
 }
 
 
+func _() {
+       var privateKey2 = &Block{Type:  "RSA PRIVATE KEY",
+               Headers:        map[string]string{},
+               Bytes: []uint8{0x30, 0x82, 0x1, 0x3a, 0x2, 0x1, 0x0, 0x2,
+                       0x41, 0x0, 0xb2, 0x99, 0xf, 0x49, 0xc4, 0x7d, 0xfa, 0x8c,
+                       0xd4, 0x0, 0xae, 0x6a, 0x4d, 0x1b, 0x8a, 0x3b, 0x6a, 0x13,
+                       0x64, 0x2b, 0x23, 0xf2, 0x8b, 0x0, 0x3b, 0xfb, 0x97, 0x79,
+               },
+       }
+}
+
+
 func _() {
        var Universe = Scope{
                Names: map[string]*Ident{
                        // basic types
-                       "bool": nil,
-                       "byte": nil,
-                       "int8": nil,
-                       "int16": nil,
-                       "int32": nil,
-                       "int64": nil,
-                       "uint8": nil,
-                       "uint16": nil,
-                       "uint32": nil,
-                       "uint64": nil,
-                       "float32": nil,
-                       "float64": nil,
-                       "string": nil,
+                       "bool":         nil,
+                       "byte":         nil,
+                       "int8":         nil,
+                       "int16":        nil,
+                       "int32":        nil,
+                       "int64":        nil,
+                       "uint8":        nil,
+                       "uint16":       nil,
+                       "uint32":       nil,
+                       "uint64":       nil,
+                       "float32":      nil,
+                       "float64":      nil,
+                       "string":       nil,
 
                        // convenience types
-                       "int": nil,
-                       "uint": nil,
-                       "uintptr": nil,
-                       "float": nil,
+                       "int":          nil,
+                       "uint":         nil,
+                       "uintptr":      nil,
+                       "float":        nil,
 
                        // constants
-                       "false": nil,
-                       "true": nil,
-                       "iota": nil,
-                       "nil": nil,
+                       "false":        nil,
+                       "true":         nil,
+                       "iota":         nil,
+                       "nil":          nil,
 
                        // functions
-                       "cap": nil,
-                       "len": nil,
-                       "new": nil,
-                       "make": nil,
-                       "panic": nil,
-                       "panicln": nil,
-                       "print": nil,
-                       "println": nil,
+                       "cap":          nil,
+                       "len":          nil,
+                       "new":          nil,
+                       "make":         nil,
+                       "panic":        nil,
+                       "panicln":      nil,
+                       "print":        nil,
+                       "println":      nil,
                },
        }
 }
index c47be82b46f4c01e1d7ef537ca395f89aa1dd397..6c3e1682b099202d16bbc9ed5c7acce6bed2a6cc 100644 (file)
@@ -459,6 +459,18 @@ func _() {
 }
 
 
+func _() {
+       var privateKey2 = &Block{Type: "RSA PRIVATE KEY",
+                                       Headers: map[string]string{},
+                                       Bytes: []uint8{0x30, 0x82, 0x1, 0x3a, 0x2, 0x1, 0x0, 0x2,
+                       0x41, 0x0, 0xb2, 0x99, 0xf, 0x49, 0xc4, 0x7d, 0xfa, 0x8c,
+                       0xd4, 0x0, 0xae, 0x6a, 0x4d, 0x1b, 0x8a, 0x3b, 0x6a, 0x13,
+                       0x64, 0x2b, 0x23, 0xf2, 0x8b, 0x0, 0x3b, 0xfb, 0x97, 0x79,
+               },
+       }
+}
+
+
 func _() {
        var Universe = Scope {
                Names: map[string]*Ident {
index 01c673f7704fe1194fdd3791a17c7f8a8a0e4a12..3179156e4ba56b689e1362f96c4dd7611a9af407 100644 (file)
@@ -26,35 +26,35 @@ type writerTest struct {
 
 var writerTests = []*writerTest{
        &writerTest{
-               file: "testdata/writer.tar",
+               file:   "testdata/writer.tar",
                entries: []*writerTestEntry{
                        &writerTestEntry{
                                header: &Header{
-                                       Name: "small.txt",
-                                       Mode: 0640,
-                                       Uid: 73025,
-                                       Gid: 5000,
-                                       Size: 5,
-                                       Mtime: 1246508266,
-                                       Typeflag: '0',
-                                       Uname: "dsymonds",
-                                       Gname: "eng",
+                                       Name:           "small.txt",
+                                       Mode:           0640,
+                                       Uid:            73025,
+                                       Gid:            5000,
+                                       Size:           5,
+                                       Mtime:          1246508266,
+                                       Typeflag:       '0',
+                                       Uname:          "dsymonds",
+                                       Gname:          "eng",
                                },
-                               contents: "Kilts",
+                               contents:       "Kilts",
                        },
                        &writerTestEntry{
                                header: &Header{
-                                       Name: "small2.txt",
-                                       Mode: 0640,
-                                       Uid: 73025,
-                                       Gid: 5000,
-                                       Size: 11,
-                                       Mtime: 1245217492,
-                                       Typeflag: '0',
-                                       Uname: "dsymonds",
-                                       Gname: "eng",
+                                       Name:           "small2.txt",
+                                       Mode:           0640,
+                                       Uid:            73025,
+                                       Gid:            5000,
+                                       Size:           11,
+                                       Mtime:          1245217492,
+                                       Typeflag:       '0',
+                                       Uname:          "dsymonds",
+                                       Gname:          "eng",
                                },
-                               contents: "Google.com\n",
+                               contents:       "Google.com\n",
                        },
                },
        },
@@ -62,19 +62,19 @@ var writerTests = []*writerTest{
        //   dd if=/dev/zero bs=1048576 count=16384 > /tmp/16gig.txt
        //   tar -b 1 -c -f- /tmp/16gig.txt | dd bs=512 count=8 > writer-big.tar
        &writerTest{
-               file: "testdata/writer-big.tar",
+               file:   "testdata/writer-big.tar",
                entries: []*writerTestEntry{
                        &writerTestEntry{
                                header: &Header{
-                                       Name: "tmp/16gig.txt",
-                                       Mode: 0640,
-                                       Uid: 73025,
-                                       Gid: 5000,
-                                       Size: 16 << 30,
-                                       Mtime: 1254699560,
-                                       Typeflag: '0',
-                                       Uname: "dsymonds",
-                                       Gname: "eng",
+                                       Name:           "tmp/16gig.txt",
+                                       Mode:           0640,
+                                       Uid:            73025,
+                                       Gid:            5000,
+                                       Size:           16 << 30,
+                                       Mtime:          1254699560,
+                                       Typeflag:       '0',
+                                       Uname:          "dsymonds",
+                                       Gname:          "eng",
                                },
                                // no contents
                        },
@@ -89,94 +89,94 @@ type untarTest struct {
 
 var untarTests = []*untarTest{
        &untarTest{
-               file: "testdata/gnu.tar",
+               file:   "testdata/gnu.tar",
                headers: []*Header{
                        &Header{
-                               Name: "small.txt",
-                               Mode: 0640,
-                               Uid: 73025,
-                               Gid: 5000,
-                               Size: 5,
-                               Mtime: 1244428340,
-                               Typeflag: '0',
-                               Uname: "dsymonds",
-                               Gname: "eng",
+                               Name:           "small.txt",
+                               Mode:           0640,
+                               Uid:            73025,
+                               Gid:            5000,
+                               Size:           5,
+                               Mtime:          1244428340,
+                               Typeflag:       '0',
+                               Uname:          "dsymonds",
+                               Gname:          "eng",
                        },
                        &Header{
-                               Name: "small2.txt",
-                               Mode: 0640,
-                               Uid: 73025,
-                               Gid: 5000,
-                               Size: 11,
-                               Mtime: 1244436044,
-                               Typeflag: '0',
-                               Uname: "dsymonds",
-                               Gname: "eng",
+                               Name:           "small2.txt",
+                               Mode:           0640,
+                               Uid:            73025,
+                               Gid:            5000,
+                               Size:           11,
+                               Mtime:          1244436044,
+                               Typeflag:       '0',
+                               Uname:          "dsymonds",
+                               Gname:          "eng",
                        },
                },
        },
        &untarTest{
-               file: "testdata/star.tar",
+               file:   "testdata/star.tar",
                headers: []*Header{
                        &Header{
-                               Name: "small.txt",
-                               Mode: 0640,
-                               Uid: 73025,
-                               Gid: 5000,
-                               Size: 5,
-                               Mtime: 1244592783,
-                               Typeflag: '0',
-                               Uname: "dsymonds",
-                               Gname: "eng",
-                               Atime: 1244592783,
-                               Ctime: 1244592783,
+                               Name:           "small.txt",
+                               Mode:           0640,
+                               Uid:            73025,
+                               Gid:            5000,
+                               Size:           5,
+                               Mtime:          1244592783,
+                               Typeflag:       '0',
+                               Uname:          "dsymonds",
+                               Gname:          "eng",
+                               Atime:          1244592783,
+                               Ctime:          1244592783,
                        },
                        &Header{
-                               Name: "small2.txt",
-                               Mode: 0640,
-                               Uid: 73025,
-                               Gid: 5000,
-                               Size: 11,
-                               Mtime: 1244592783,
-                               Typeflag: '0',
-                               Uname: "dsymonds",
-                               Gname: "eng",
-                               Atime: 1244592783,
-                               Ctime: 1244592783,
+                               Name:           "small2.txt",
+                               Mode:           0640,
+                               Uid:            73025,
+                               Gid:            5000,
+                               Size:           11,
+                               Mtime:          1244592783,
+                               Typeflag:       '0',
+                               Uname:          "dsymonds",
+                               Gname:          "eng",
+                               Atime:          1244592783,
+                               Ctime:          1244592783,
                        },
                },
        },
        &untarTest{
-               file: "testdata/v7.tar",
+               file:   "testdata/v7.tar",
                headers: []*Header{
                        &Header{
-                               Name: "small.txt",
-                               Mode: 0444,
-                               Uid: 73025,
-                               Gid: 5000,
-                               Size: 5,
-                               Mtime: 1244593104,
-                               Typeflag: '\x00',
+                               Name:           "small.txt",
+                               Mode:           0444,
+                               Uid:            73025,
+                               Gid:            5000,
+                               Size:           5,
+                               Mtime:          1244593104,
+                               Typeflag:       '\x00',
                        },
                        &Header{
-                               Name: "small2.txt",
-                               Mode: 0444,
-                               Uid: 73025,
-                               Gid: 5000,
-                               Size: 11,
-                               Mtime: 1244593104,
-                               Typeflag: '\x00',
+                               Name:           "small2.txt",
+                               Mode:           0444,
+                               Uid:            73025,
+                               Gid:            5000,
+                               Size:           11,
+                               Mtime:          1244593104,
+                               Typeflag:       '\x00',
                        },
                },
        },
 }
 
 var facts = map[int]string{
-       0: "1",
-       1: "1",
-       2: "2",
-       10: "3628800",
-       20: "2432902008176640000",
+       0:      "1",
+       1:      "1",
+       2:      "2",
+       10:     "3628800",
+       20:     "2432902008176640000",
        100: "933262154439441526816992388562667004907159682643816214685929" +
                "638952175999932299156089414639761565182862536979208272237582" +
                "51185210916864000000000000000000000000",
index df4064c009b30c9e86d6a8cbb451ba309e865b58..70c2501e9cba0a8185ed488840df9e95478856e9 100644 (file)
@@ -135,14 +135,14 @@ const (
 var tokens = map[Token]string{
        ILLEGAL: "ILLEGAL",
 
-       EOF: "EOF",
+       EOF:     "EOF",
        COMMENT: "COMMENT",
 
-       IDENT: "IDENT",
-       INT: "INT",
-       FLOAT: "FLOAT",
-       IMAG: "IMAG",
-       CHAR: "CHAR",
+       IDENT:  "IDENT",
+       INT:    "INT",
+       FLOAT:  "FLOAT",
+       IMAG:   "IMAG",
+       CHAR:   "CHAR",
        STRING: "STRING",
 
        ADD: "+",
@@ -151,11 +151,11 @@ var tokens = map[Token]string{
        QUO: "/",
        REM: "%",
 
-       AND: "&",
-       OR: "|",
-       XOR: "^",
-       SHL: "<<",
-       SHR: ">>",
+       AND:     "&",
+       OR:      "|",
+       XOR:     "^",
+       SHL:     "<<",
+       SHR:     ">>",
        AND_NOT: "&^",
 
        ADD_ASSIGN: "+=",
@@ -164,72 +164,72 @@ var tokens = map[Token]string{
        QUO_ASSIGN: "/=",
        REM_ASSIGN: "%=",
 
-       AND_ASSIGN: "&=",
-       OR_ASSIGN: "|=",
-       XOR_ASSIGN: "^=",
-       SHL_ASSIGN: "<<=",
-       SHR_ASSIGN: ">>=",
+       AND_ASSIGN:     "&=",
+       OR_ASSIGN:      "|=",
+       XOR_ASSIGN:     "^=",
+       SHL_ASSIGN:     "<<=",
+       SHR_ASSIGN:     ">>=",
        AND_NOT_ASSIGN: "&^=",
 
-       LAND: "&&",
-       LOR: "||",
+       LAND:  "&&",
+       LOR:   "||",
        ARROW: "<-",
-       INC: "++",
-       DEC: "--",
+       INC:   "++",
+       DEC:   "--",
 
-       EQL: "==",
-       LSS: "<",
-       GTR: ">",
+       EQL:    "==",
+       LSS:    "<",
+       GTR:    ">",
        ASSIGN: "=",
-       NOT: "!",
+       NOT:    "!",
 
-       NEQ: "!=",
-       LEQ: "<=",
-       GEQ: ">=",
-       DEFINE: ":=",
+       NEQ:      "!=",
+       LEQ:      "<=",
+       GEQ:      ">=",
+       DEFINE:   ":=",
        ELLIPSIS: "...",
 
        LPAREN: "(",
        LBRACK: "[",
        LBRACE: "{",
-       COMMA: ",",
+       COMMA:  ",",
        PERIOD: ".",
 
-       RPAREN: ")",
-       RBRACK: "]",
-       RBRACE: "}",
+       RPAREN:    ")",
+       RBRACK:    "]",
+       RBRACE:    "}",
        SEMICOLON: ";",
-       COLON: ":",
+       COLON:     ":",
 
-       BREAK: "break",
-       CASE: "case",
-       CHAN: "chan",
-       CONST: "const",
+       BREAK:    "break",
+       CASE:     "case",
+       CHAN:     "chan",
+       CONST:    "const",
        CONTINUE: "continue",
 
-       DEFAULT: "default",
-       DEFER: "defer",
-       ELSE: "else",
+       DEFAULT:     "default",
+       DEFER:       "defer",
+       ELSE:        "else",
        FALLTHROUGH: "fallthrough",
-       FOR: "for",
+       FOR:         "for",
 
-       FUNC: "func",
-       GO: "go",
-       GOTO: "goto",
-       IF: "if",
+       FUNC:   "func",
+       GO:     "go",
+       GOTO:   "goto",
+       IF:     "if",
        IMPORT: "import",
 
        INTERFACE: "interface",
-       MAP: "map",
-       PACKAGE: "package",
-       RANGE: "range",
-       RETURN: "return",
+       MAP:       "map",
+       PACKAGE:   "package",
+       RANGE:     "range",
+       RETURN:    "return",
 
        SELECT: "select",
        STRUCT: "struct",
        SWITCH: "switch",
-       TYPE: "type",
-       VAR: "var",
+       TYPE:   "type",
+       VAR:    "var",
 }
 
 
index 2ab46a7b0bd49cc23a66898b58d973a1384734c7..df82a5b6bce0339ee32bf038408451eeadc188c5 100644 (file)
@@ -580,15 +580,15 @@ func TestEndToEnd(t *testing.T) {
                t       *T2
        }
        t1 := &T1{
-               a: 17,
-               b: 18,
-               c: -5,
-               n: &[3]float{1.5, 2.5, 3.5},
-               strs: &[2]string{s1, s2},
+               a:      17,
+               b:      18,
+               c:      -5,
+               n:      &[3]float{1.5, 2.5, 3.5},
+               strs:   &[2]string{s1, s2},
                int64s: &[]int64{77, 89, 123412342134},
-               s: "Now is the time",
-               y: []byte("hello, sailor"),
-               t: &T2{"this is T2"},
+               s:      "Now is the time",
+               y:      []byte("hello, sailor"),
+               t:      &T2{"this is T2"},
        }
        b := new(bytes.Buffer)
        err := NewEncoder(b).Encode(t1)
index 88bc65d62189f644e82e76a103eb7418ff0f1964..9dea080f8f59af8262f755da9fb8222dbec323eb 100644 (file)
@@ -486,26 +486,26 @@ func ignoreSlice(state *decodeState, elemOp decOp) os.Error {
 }
 
 var decOpMap = map[reflect.Type]decOp{
-       valueKind(false): decBool,
-       valueKind(int8(0)): decInt8,
-       valueKind(int16(0)): decInt16,
-       valueKind(int32(0)): decInt32,
-       valueKind(int64(0)): decInt64,
-       valueKind(uint8(0)): decUint8,
-       valueKind(uint16(0)): decUint16,
-       valueKind(uint32(0)): decUint32,
-       valueKind(uint64(0)): decUint64,
+       valueKind(false):      decBool,
+       valueKind(int8(0)):    decInt8,
+       valueKind(int16(0)):   decInt16,
+       valueKind(int32(0)):   decInt32,
+       valueKind(int64(0)):   decInt64,
+       valueKind(uint8(0)):   decUint8,
+       valueKind(uint16(0)):  decUint16,
+       valueKind(uint32(0)):  decUint32,
+       valueKind(uint64(0)):  decUint64,
        valueKind(float32(0)): decFloat32,
        valueKind(float64(0)): decFloat64,
-       valueKind("x"): decString,
+       valueKind("x"):        decString,
 }
 
 var decIgnoreOpMap = map[typeId]decOp{
-       tBool: ignoreUint,
-       tInt: ignoreUint,
-       tUint: ignoreUint,
-       tFloat: ignoreUint,
-       tBytes: ignoreUint8Array,
+       tBool:   ignoreUint,
+       tInt:    ignoreUint,
+       tUint:   ignoreUint,
+       tFloat:  ignoreUint,
+       tBytes:  ignoreUint8Array,
        tString: ignoreUint8Array,
 }
 
index cbb64b5a47daca1c005151ec51a94a28353b7306..cfd4a73c85eb17e5fa5249ac548c428e0da31aa4 100644 (file)
@@ -320,22 +320,22 @@ func encodeArray(b *bytes.Buffer, p uintptr, op encOp, elemWid uintptr, length i
 }
 
 var encOpMap = map[reflect.Type]encOp{
-       valueKind(false): encBool,
-       valueKind(int(0)): encInt,
-       valueKind(int8(0)): encInt8,
-       valueKind(int16(0)): encInt16,
-       valueKind(int32(0)): encInt32,
-       valueKind(int64(0)): encInt64,
-       valueKind(uint(0)): encUint,
-       valueKind(uint8(0)): encUint8,
-       valueKind(uint16(0)): encUint16,
-       valueKind(uint32(0)): encUint32,
-       valueKind(uint64(0)): encUint64,
+       valueKind(false):      encBool,
+       valueKind(int(0)):     encInt,
+       valueKind(int8(0)):    encInt8,
+       valueKind(int16(0)):   encInt16,
+       valueKind(int32(0)):   encInt32,
+       valueKind(int64(0)):   encInt64,
+       valueKind(uint(0)):    encUint,
+       valueKind(uint8(0)):   encUint8,
+       valueKind(uint16(0)):  encUint16,
+       valueKind(uint32(0)):  encUint32,
+       valueKind(uint64(0)):  encUint64,
        valueKind(uintptr(0)): encUintptr,
-       valueKind(float(0)): encFloat,
+       valueKind(float(0)):   encFloat,
        valueKind(float32(0)): encFloat32,
        valueKind(float64(0)): encFloat64,
-       valueKind("x"): encString,
+       valueKind("x"):        encString,
 }
 
 // Return the encoding op for the base type under rt and
index a67070f5eb5e002bb82081c83c7c61fda3af8187..043430cb743f80cbcbb8ffbc33a79ff042531880 100644 (file)
@@ -16,29 +16,29 @@ type lexTest struct {
 
 var lexTests = []lexTest{
        lexTest{
-               Raw: `"abc"def,:ghi`,
+               Raw:    `"abc"def,:ghi`,
                Parsed: 13,
                Result: []string{"abcdef", "ghi"},
        },
        // My understanding of the RFC is that escape sequences outside of
        // quotes are not interpreted?
        lexTest{
-               Raw: `"\t"\t"\t"`,
+               Raw:    `"\t"\t"\t"`,
                Parsed: 10,
                Result: []string{"\t", "t\t"},
        },
        lexTest{
-               Raw: `"\yab"\r\n`,
+               Raw:    `"\yab"\r\n`,
                Parsed: 10,
                Result: []string{"?ab", "r", "n"},
        },
        lexTest{
-               Raw: "ab\f",
+               Raw:    "ab\f",
                Parsed: 3,
                Result: []string{"ab?"},
        },
        lexTest{
-               Raw: "\"ab \" c,de f, gh, ij\n\t\r",
+               Raw:    "\"ab \" c,de f, gh, ij\n\t\r",
                Parsed: 23,
                Result: []string{"ab ", "c", "de", "f", "gh", "ij"},
        },
index ed2ebe97bb49881af247585236069e6d0ab16e70..0ef02d3fca8bee7d92ce85d041d1aad2ea4c5dd1 100644 (file)
@@ -37,34 +37,34 @@ var reqTests = []reqTest{
                        Method: "GET",
                        RawURL: "http://www.techcrunch.com/",
                        URL: &URL{
-                               Raw: "http://www.techcrunch.com/",
-                               Scheme: "http",
-                               RawPath: "//www.techcrunch.com/",
+                               Raw:       "http://www.techcrunch.com/",
+                               Scheme:    "http",
+                               RawPath:   "//www.techcrunch.com/",
                                Authority: "www.techcrunch.com",
-                               Userinfo: "",
-                               Host: "www.techcrunch.com",
-                               Path: "/",
-                               RawQuery: "",
-                               Fragment: "",
+                               Userinfo:  "",
+                               Host:      "www.techcrunch.com",
+                               Path:      "/",
+                               RawQuery:  "",
+                               Fragment:  "",
                        },
-                       Proto: "HTTP/1.1",
+                       Proto:      "HTTP/1.1",
                        ProtoMajor: 1,
                        ProtoMinor: 1,
                        Header: map[string]string{
                                "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
-                               "Accept-Language": "en-us,en;q=0.5",
-                               "Accept-Encoding": "gzip,deflate",
-                               "Accept-Charset": "ISO-8859-1,utf-8;q=0.7,*;q=0.7",
-                               "Keep-Alive": "300",
+                               "Accept-Language":  "en-us,en;q=0.5",
+                               "Accept-Encoding":  "gzip,deflate",
+                               "Accept-Charset":   "ISO-8859-1,utf-8;q=0.7,*;q=0.7",
+                               "Keep-Alive":       "300",
                                "Proxy-Connection": "keep-alive",
-                               "Content-Length": "7",
+                               "Content-Length":   "7",
                        },
-                       Close: false,
+                       Close:         false,
                        ContentLength: 7,
-                       Host: "www.techcrunch.com",
-                       Referer: "",
-                       UserAgent: "Fake",
-                       Form: map[string][]string{},
+                       Host:          "www.techcrunch.com",
+                       Referer:       "",
+                       UserAgent:     "Fake",
+                       Form:          map[string][]string{},
                },
 
                "abcdef\n",
index 9f18acb3b78d67e93fb5b0d70ffd68af5c14f9e8..82701adc664fc01d2e48df78cd0a4bab3ab52ed4 100644 (file)
@@ -50,12 +50,12 @@ type badStringError struct {
 func (e *badStringError) String() string { return fmt.Sprintf("%s %q", e.what, e.str) }
 
 var reqExcludeHeader = map[string]int{
-       "Host": 0,
-       "User-Agent": 0,
-       "Referer": 0,
-       "Content-Length": 0,
+       "Host":              0,
+       "User-Agent":        0,
+       "Referer":           0,
+       "Content-Length":    0,
        "Transfer-Encoding": 0,
-       "Trailer": 0,
+       "Trailer":           0,
 }
 
 // A Request represents a parsed HTTP request header.
index 6e483c769af2e7d974eca9b01544f3459f418676..7d9bca67913074c6389977c3a0637dbfdf098049 100644 (file)
@@ -19,15 +19,15 @@ type parseTest struct {
 var parseTests = []parseTest{
        parseTest{
                query: "a=1&b=2",
-               out: stringMultimap{"a": []string{"1"}, "b": []string{"2"}},
+               out:   stringMultimap{"a": []string{"1"}, "b": []string{"2"}},
        },
        parseTest{
                query: "a=1&a=2&a=banana",
-               out: stringMultimap{"a": []string{"1", "2", "banana"}},
+               out:   stringMultimap{"a": []string{"1", "2", "banana"}},
        },
        parseTest{
                query: "ascii=%3Ckey%3A+0x90%3E",
-               out: stringMultimap{"ascii": []string{"<key: 0x90>"}},
+               out:   stringMultimap{"ascii": []string{"<key: 0x90>"}},
        },
 }
 
@@ -90,7 +90,7 @@ func TestPostContentTypeParsing(t *testing.T) {
                req := &Request{
                        Method: "POST",
                        Header: test.contentType,
-                       Body: nopCloser{bytes.NewBufferString("body")},
+                       Body:   nopCloser{bytes.NewBufferString("body")},
                }
                err := req.ParseForm()
                if !test.error && err != nil {
index f39e8a86d58b0f2bb4fa56648571ea8001397586..916a18b94e6ced3336ebafcf278957594b05e9fd 100644 (file)
@@ -21,33 +21,33 @@ var reqWriteTests = []reqWriteTest{
                        Method: "GET",
                        RawURL: "http://www.techcrunch.com/",
                        URL: &URL{
-                               Raw: "http://www.techcrunch.com/",
-                               Scheme: "http",
-                               RawPath: "//www.techcrunch.com/",
+                               Raw:       "http://www.techcrunch.com/",
+                               Scheme:    "http",
+                               RawPath:   "//www.techcrunch.com/",
                                Authority: "www.techcrunch.com",
-                               Userinfo: "",
-                               Host: "www.techcrunch.com",
-                               Path: "/",
-                               RawQuery: "",
-                               Fragment: "",
+                               Userinfo:  "",
+                               Host:      "www.techcrunch.com",
+                               Path:      "/",
+                               RawQuery:  "",
+                               Fragment:  "",
                        },
-                       Proto: "HTTP/1.1",
+                       Proto:      "HTTP/1.1",
                        ProtoMajor: 1,
                        ProtoMinor: 1,
                        Header: map[string]string{
                                "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
-                               "Accept-Charset": "ISO-8859-1,utf-8;q=0.7,*;q=0.7",
-                               "Accept-Encoding": "gzip,deflate",
-                               "Accept-Language": "en-us,en;q=0.5",
-                               "Keep-Alive": "300",
+                               "Accept-Charset":   "ISO-8859-1,utf-8;q=0.7,*;q=0.7",
+                               "Accept-Encoding":  "gzip,deflate",
+                               "Accept-Language":  "en-us,en;q=0.5",
+                               "Keep-Alive":       "300",
                                "Proxy-Connection": "keep-alive",
                        },
-                       Body: nil,
-                       Close: false,
-                       Host: "www.techcrunch.com",
-                       Referer: "",
+                       Body:      nil,
+                       Close:     false,
+                       Host:      "www.techcrunch.com",
+                       Referer:   "",
                        UserAgent: "Fake",
-                       Form: map[string][]string{},
+                       Form:      map[string][]string{},
                },
 
                "GET http://www.techcrunch.com/ HTTP/1.1\r\n" +
@@ -66,13 +66,13 @@ var reqWriteTests = []reqWriteTest{
                        Method: "GET",
                        URL: &URL{
                                Scheme: "http",
-                               Host: "www.google.com",
-                               Path: "/search",
+                               Host:   "www.google.com",
+                               Path:   "/search",
                        },
-                       ProtoMajor: 1,
-                       ProtoMinor: 1,
-                       Header: map[string]string{},
-                       Body: nopCloser{bytes.NewBufferString("abcdef")},
+                       ProtoMajor:       1,
+                       ProtoMinor:       1,
+                       Header:           map[string]string{},
+                       Body:             nopCloser{bytes.NewBufferString("abcdef")},
                        TransferEncoding: []string{"chunked"},
                },
 
@@ -88,14 +88,14 @@ var reqWriteTests = []reqWriteTest{
                        Method: "POST",
                        URL: &URL{
                                Scheme: "http",
-                               Host: "www.google.com",
-                               Path: "/search",
+                               Host:   "www.google.com",
+                               Path:   "/search",
                        },
-                       ProtoMajor: 1,
-                       ProtoMinor: 1,
-                       Header: map[string]string{},
-                       Close: true,
-                       Body: nopCloser{bytes.NewBufferString("abcdef")},
+                       ProtoMajor:       1,
+                       ProtoMinor:       1,
+                       Header:           map[string]string{},
+                       Close:            true,
+                       Body:             nopCloser{bytes.NewBufferString("abcdef")},
                        TransferEncoding: []string{"chunked"},
                },
 
@@ -111,7 +111,7 @@ var reqWriteTests = []reqWriteTest{
                Request{
                        Method: "GET",
                        RawURL: "/search",
-                       Host: "www.google.com",
+                       Host:   "www.google.com",
                },
 
                "GET /search HTTP/1.1\r\n" +
index 28f002d9b8b43308f4433f9912a4b8b00c56024c..2e7c532ff96edf15bfcaefd61a1849ea10270a6d 100644 (file)
@@ -17,9 +17,9 @@ import (
 )
 
 var respExcludeHeader = map[string]int{
-       "Content-Length": 0,
+       "Content-Length":    0,
        "Transfer-Encoding": 0,
-       "Trailer": 0,
+       "Trailer":           0,
 }
 
 // Response represents the response from an HTTP request.
index 6024a62719246f7ddd083f0c784143ddc493a3fb..889b770be4aaddacbf2c595fc20c83f15d5a6b98 100644 (file)
@@ -28,16 +28,16 @@ var respTests = []respTest{
                        "Body here\n",
 
                Response{
-                       Status: "200 OK",
-                       StatusCode: 200,
-                       Proto: "HTTP/1.0",
-                       ProtoMajor: 1,
-                       ProtoMinor: 0,
+                       Status:        "200 OK",
+                       StatusCode:    200,
+                       Proto:         "HTTP/1.0",
+                       ProtoMajor:    1,
+                       ProtoMinor:    0,
                        RequestMethod: "GET",
                        Header: map[string]string{
                                "Connection": "close", // TODO(rsc): Delete?
                        },
-                       Close: true,
+                       Close:         true,
                        ContentLength: -1,
                },
 
@@ -53,17 +53,17 @@ var respTests = []respTest{
                        "Body here\n",
 
                Response{
-                       Status: "200 OK",
-                       StatusCode: 200,
-                       Proto: "HTTP/1.0",
-                       ProtoMajor: 1,
-                       ProtoMinor: 0,
+                       Status:        "200 OK",
+                       StatusCode:    200,
+                       Proto:         "HTTP/1.0",
+                       ProtoMajor:    1,
+                       ProtoMinor:    0,
                        RequestMethod: "GET",
                        Header: map[string]string{
-                               "Connection": "close",  // TODO(rsc): Delete?
-                               "Content-Length": "10", // TODO(rsc): Delete?
+                               "Connection":     "close", // TODO(rsc): Delete?
+                               "Content-Length": "10",    // TODO(rsc): Delete?
                        },
-                       Close: true,
+                       Close:         true,
                        ContentLength: 10,
                },
 
@@ -81,15 +81,15 @@ var respTests = []respTest{
                        "\r\n",
 
                Response{
-                       Status: "200 OK",
-                       StatusCode: 200,
-                       Proto: "HTTP/1.0",
-                       ProtoMajor: 1,
-                       ProtoMinor: 0,
-                       RequestMethod: "GET",
-                       Header: map[string]string{},
-                       Close: true,
-                       ContentLength: -1,
+                       Status:           "200 OK",
+                       StatusCode:       200,
+                       Proto:            "HTTP/1.0",
+                       ProtoMajor:       1,
+                       ProtoMinor:       0,
+                       RequestMethod:    "GET",
+                       Header:           map[string]string{},
+                       Close:            true,
+                       ContentLength:    -1,
                        TransferEncoding: []string{"chunked"},
                },
 
@@ -108,15 +108,15 @@ var respTests = []respTest{
                        "\r\n",
 
                Response{
-                       Status: "200 OK",
-                       StatusCode: 200,
-                       Proto: "HTTP/1.0",
-                       ProtoMajor: 1,
-                       ProtoMinor: 0,
-                       RequestMethod: "GET",
-                       Header: map[string]string{},
-                       Close: true,
-                       ContentLength: -1, // TODO(rsc): Fix?
+                       Status:           "200 OK",
+                       StatusCode:       200,
+                       Proto:            "HTTP/1.0",
+                       ProtoMajor:       1,
+                       ProtoMinor:       0,
+                       RequestMethod:    "GET",
+                       Header:           map[string]string{},
+                       Close:            true,
+                       ContentLength:    -1, // TODO(rsc): Fix?
                        TransferEncoding: []string{"chunked"},
                },
 
index 1c7c5f72ae6ed209e63caa56b057990553dc4ada..7680643032289a077ac9ca177b557d232d820b2d 100644 (file)
@@ -18,12 +18,12 @@ var respWriteTests = []respWriteTest{
        // HTTP/1.0, identity coding; no trailer
        respWriteTest{
                Response{
-                       StatusCode: 503,
-                       ProtoMajor: 1,
-                       ProtoMinor: 0,
+                       StatusCode:    503,
+                       ProtoMajor:    1,
+                       ProtoMinor:    0,
                        RequestMethod: "GET",
-                       Header: map[string]string{},
-                       Body: nopCloser{bytes.NewBufferString("abcdef")},
+                       Header:        map[string]string{},
+                       Body:          nopCloser{bytes.NewBufferString("abcdef")},
                        ContentLength: 6,
                },
 
@@ -34,15 +34,15 @@ var respWriteTests = []respWriteTest{
        // HTTP/1.1, chunked coding; empty trailer; close
        respWriteTest{
                Response{
-                       StatusCode: 200,
-                       ProtoMajor: 1,
-                       ProtoMinor: 1,
-                       RequestMethod: "GET",
-                       Header: map[string]string{},
-                       Body: nopCloser{bytes.NewBufferString("abcdef")},
-                       ContentLength: 6,
+                       StatusCode:       200,
+                       ProtoMajor:       1,
+                       ProtoMinor:       1,
+                       RequestMethod:    "GET",
+                       Header:           map[string]string{},
+                       Body:             nopCloser{bytes.NewBufferString("abcdef")},
+                       ContentLength:    6,
                        TransferEncoding: []string{"chunked"},
-                       Close: true,
+                       Close:            true,
                },
 
                "HTTP/1.1 200 OK\r\n" +
index e39c198063bce61a641f7032a73c437c68810f19..a446dc4b61f7f262ab419002ab6eb263376a72a6 100644 (file)
@@ -53,48 +53,48 @@ const (
 )
 
 var statusText = map[int]string{
-       StatusContinue: "Continue",
+       StatusContinue:           "Continue",
        StatusSwitchingProtocols: "Switching Protocols",
 
-       StatusOK: "OK",
-       StatusCreated: "Created",
-       StatusAccepted: "Accepted",
+       StatusOK:                   "OK",
+       StatusCreated:              "Created",
+       StatusAccepted:             "Accepted",
        StatusNonAuthoritativeInfo: "Non-Authoritative Information",
-       StatusNoContent: "No Content",
-       StatusResetContent: "Reset Content",
-       StatusPartialContent: "Partial Content",
+       StatusNoContent:            "No Content",
+       StatusResetContent:         "Reset Content",
+       StatusPartialContent:       "Partial Content",
 
-       StatusMultipleChoices: "Multiple Choices",
-       StatusMovedPermanently: "Moved Permanently",
-       StatusFound: "Found",
-       StatusSeeOther: "See Other",
-       StatusNotModified: "Not Modified",
-       StatusUseProxy: "Use Proxy",
+       StatusMultipleChoices:   "Multiple Choices",
+       StatusMovedPermanently:  "Moved Permanently",
+       StatusFound:             "Found",
+       StatusSeeOther:          "See Other",
+       StatusNotModified:       "Not Modified",
+       StatusUseProxy:          "Use Proxy",
        StatusTemporaryRedirect: "Temporary Redirect",
 
-       StatusBadRequest: "Bad Request",
-       StatusUnauthorized: "Unauthorized",
-       StatusPaymentRequired: "Payment Required",
-       StatusForbidden: "Forbidden",
-       StatusNotFound: "Not Found",
-       StatusMethodNotAllowed: "Method Not Allowed",
-       StatusNotAcceptable: "Not Acceptable",
-       StatusProxyAuthRequired: "Proxy Authentication Required",
-       StatusRequestTimeout: "Request Timeout",
-       StatusConflict: "Conflict",
-       StatusGone: "Gone",
-       StatusLengthRequired: "Length Required",
-       StatusPreconditionFailed: "Precondition Failed",
+       StatusBadRequest:            "Bad Request",
+       StatusUnauthorized:          "Unauthorized",
+       StatusPaymentRequired:       "Payment Required",
+       StatusForbidden:             "Forbidden",
+       StatusNotFound:              "Not Found",
+       StatusMethodNotAllowed:      "Method Not Allowed",
+       StatusNotAcceptable:         "Not Acceptable",
+       StatusProxyAuthRequired:     "Proxy Authentication Required",
+       StatusRequestTimeout:        "Request Timeout",
+       StatusConflict:              "Conflict",
+       StatusGone:                  "Gone",
+       StatusLengthRequired:        "Length Required",
+       StatusPreconditionFailed:    "Precondition Failed",
        StatusRequestEntityTooLarge: "Request Entity Too Large",
-       StatusRequestURITooLong: "Request URI Too Long",
-       StatusUnsupportedMediaType: "Unsupported Media Type",
+       StatusRequestURITooLong:     "Request URI Too Long",
+       StatusUnsupportedMediaType:  "Unsupported Media Type",
        StatusRequestedRangeNotSatisfiable: "Requested Range Not Satisfiable",
        StatusExpectationFailed: "Expectation Failed",
 
-       StatusInternalServerError: "Internal Server Error",
-       StatusNotImplemented: "Not Implemented",
-       StatusBadGateway: "Bad Gateway",
-       StatusServiceUnavailable: "Service Unavailable",
-       StatusGatewayTimeout: "Gateway Timeout",
+       StatusInternalServerError:     "Internal Server Error",
+       StatusNotImplemented:          "Not Implemented",
+       StatusBadGateway:              "Bad Gateway",
+       StatusServiceUnavailable:      "Service Unavailable",
+       StatusGatewayTimeout:          "Gateway Timeout",
        StatusHTTPVersionNotSupported: "HTTP Version Not Supported",
 }
index 24c54e0e80da6eb75e75245fd8af7be0e4d59146..17e610443e7490c55fdb7a74c80905ba03566238 100644 (file)
@@ -9,8 +9,8 @@ package mime
 import "testing"
 
 var typeTests = map[string]string{
-       ".t1": "application/test",
-       ".t2": "text/test; charset=utf-8",
+       ".t1":  "application/test",
+       ".t2":  "text/test; charset=utf-8",
        ".png": "image/png",
 }
 
index 7024417cb04c43ae93aad5eea29e001e6fc4d329..6d946b5e6ed35817c650823be54ec90460242efb 100644 (file)
@@ -26,15 +26,15 @@ var typeFiles = []string{
 }
 
 var mimeTypes = map[string]string{
-       ".css": "text/css",
-       ".gif": "image/gif",
-       ".htm": "text/html; charset=utf-8",
+       ".css":  "text/css",
+       ".gif":  "image/gif",
+       ".htm":  "text/html; charset=utf-8",
        ".html": "text/html; charset=utf-8",
-       ".jpg": "image/jpeg",
-       ".js": "application/x-javascript",
-       ".pdf": "application/pdf",
-       ".png": "image/png",
-       ".xml": "text/xml; charset=utf-8",
+       ".jpg":  "image/jpeg",
+       ".js":   "application/x-javascript",
+       ".pdf":  "application/pdf",
+       ".png":  "image/png",
+       ".xml":  "text/xml; charset=utf-8",
 }
 
 func loadMimeFile(filename string) {
index 01bb49078e90a1470e7b07513e2b77f38f4b1d70..adedcab99350efb8ac43d87e69c9647d88616362 100644 (file)
@@ -246,16 +246,16 @@ func (rr *_DNS_RR_A) Header() *_DNS_RR_Header { return &rr.Hdr }
 var rr_mk = map[int]func() _DNS_RR{
        _DNS_TypeCNAME: func() _DNS_RR { return new(_DNS_RR_CNAME) },
        _DNS_TypeHINFO: func() _DNS_RR { return new(_DNS_RR_HINFO) },
-       _DNS_TypeMB: func() _DNS_RR { return new(_DNS_RR_MB) },
-       _DNS_TypeMG: func() _DNS_RR { return new(_DNS_RR_MG) },
+       _DNS_TypeMB:    func() _DNS_RR { return new(_DNS_RR_MB) },
+       _DNS_TypeMG:    func() _DNS_RR { return new(_DNS_RR_MG) },
        _DNS_TypeMINFO: func() _DNS_RR { return new(_DNS_RR_MINFO) },
-       _DNS_TypeMR: func() _DNS_RR { return new(_DNS_RR_MR) },
-       _DNS_TypeMX: func() _DNS_RR { return new(_DNS_RR_MX) },
-       _DNS_TypeNS: func() _DNS_RR { return new(_DNS_RR_NS) },
-       _DNS_TypePTR: func() _DNS_RR { return new(_DNS_RR_PTR) },
-       _DNS_TypeSOA: func() _DNS_RR { return new(_DNS_RR_SOA) },
-       _DNS_TypeTXT: func() _DNS_RR { return new(_DNS_RR_TXT) },
-       _DNS_TypeA: func() _DNS_RR { return new(_DNS_RR_A) },
+       _DNS_TypeMR:    func() _DNS_RR { return new(_DNS_RR_MR) },
+       _DNS_TypeMX:    func() _DNS_RR { return new(_DNS_RR_MX) },
+       _DNS_TypeNS:    func() _DNS_RR { return new(_DNS_RR_NS) },
+       _DNS_TypePTR:   func() _DNS_RR { return new(_DNS_RR_PTR) },
+       _DNS_TypeSOA:   func() _DNS_RR { return new(_DNS_RR_SOA) },
+       _DNS_TypeTXT:   func() _DNS_RR { return new(_DNS_RR_TXT) },
+       _DNS_TypeA:     func() _DNS_RR { return new(_DNS_RR_A) },
 }
 
 // Pack a domain name s into msg[off:].
index 743bcfa47d895457032e20c43f26704600ce6edf..83705a5a8707aa30fd2d9e047a1132b273543289 100644 (file)
@@ -301,12 +301,12 @@ func newFD(fd, family, proto int, net string, laddr, raddr Addr) (f *netFD, err
                return nil, &OpError{"setnonblock", net, laddr, os.Errno(e)}
        }
        f = &netFD{
-               sysfd: fd,
+               sysfd:  fd,
                family: family,
-               proto: proto,
-               net: net,
-               laddr: laddr,
-               raddr: raddr,
+               proto:  proto,
+               net:    net,
+               laddr:  laddr,
+               raddr:  raddr,
        }
        var ls, rs string
        if laddr != nil {
index 2bbebc951afe106579dc7b9b2d556d3fb998ebc0..626630b4a04c7b6cdc888abf331fdf5718f571cb 100644 (file)
@@ -158,7 +158,7 @@ func NewExporter(network, localaddr string) (*Exporter, os.Error) {
        }
        e := &Exporter{
                listener: listener,
-               chans: make(map[string]*exportChan),
+               chans:    make(map[string]*exportChan),
        }
        go e.listen()
        return e, nil
index 60f2c0a2c3e21fa8700f0977cbbf7ad48ddf4dbb..d183a9c59ac0da97eb89c8dd805b63290ed58894 100644 (file)
@@ -611,8 +611,8 @@ func (v *SliceValue) Elem(i int) Value {
 func MakeSlice(typ *SliceType, len, cap int) *SliceValue {
        s := &SliceHeader{
                Data: uintptr(unsafe.NewArray(typ.Elem(), cap)),
-               Len: len,
-               Cap: cap,
+               Len:  len,
+               Cap:  cap,
        }
        return newValue(typ, addr(s), true).(*SliceValue)
 }
index c9b46f0ea3ea4c998eadbe918c82e6b4c877c573..25544f667e55179d7955f21abe819c4406b51924 100644 (file)
@@ -97,14 +97,14 @@ const (
 
 
 var tokenString = map[int]string{
-       EOF: "EOF",
-       Ident: "Ident",
-       Int: "Int",
-       Float: "Float",
-       Char: "Char",
-       String: "String",
+       EOF:       "EOF",
+       Ident:     "Ident",
+       Int:       "Int",
+       Float:     "Float",
+       Char:      "Char",
+       String:    "String",
        RawString: "RawString",
-       Comment: "Comment",
+       Comment:   "Comment",
 }
 
 
index 76660a84453e2134083d00ef6a866813be3d0e58..f7cc9cd2d422b742e0c2080cb6850a99d41ca218 100644 (file)
@@ -535,107 +535,107 @@ const (
 
 // Error table
 var errors = [...]string{
-       7: "argument list too long",
-       13: "permission denied",
-       48: "address already in use",
-       49: "can't assign requested address",
-       47: "address family not supported by protocol family",
-       35: "resource temporarily unavailable",
-       37: "operation already in progress",
-       80: "authentication error",
-       86: "bad CPU type in executable",
-       85: "bad executable (or shared library)",
-       9: "bad file descriptor",
-       88: "malformed Mach-o file",
-       94: "bad message",
-       72: "RPC struct is bad",
-       16: "resource busy",
-       89: "operation canceled",
-       10: "no child processes",
-       53: "software caused connection abort",
-       61: "connection refused",
-       54: "connection reset by peer",
-       11: "resource deadlock avoided",
-       39: "destination address required",
-       83: "device error",
-       33: "numerical argument out of domain",
-       69: "disc quota exceeded",
-       17: "file exists",
-       14: "bad address",
-       27: "file too large",
-       79: "inappropriate file type or format",
-       64: "host is down",
-       65: "no route to host",
-       90: "identifier removed",
-       92: "illegal byte sequence",
-       36: "operation now in progress",
-       4: "interrupted system call",
-       22: "invalid argument",
-       5: "input/output error",
-       56: "socket is already connected",
-       21: "is a directory",
+       7:   "argument list too long",
+       13:  "permission denied",
+       48:  "address already in use",
+       49:  "can't assign requested address",
+       47:  "address family not supported by protocol family",
+       35:  "resource temporarily unavailable",
+       37:  "operation already in progress",
+       80:  "authentication error",
+       86:  "bad CPU type in executable",
+       85:  "bad executable (or shared library)",
+       9:   "bad file descriptor",
+       88:  "malformed Mach-o file",
+       94:  "bad message",
+       72:  "RPC struct is bad",
+       16:  "resource busy",
+       89:  "operation canceled",
+       10:  "no child processes",
+       53:  "software caused connection abort",
+       61:  "connection refused",
+       54:  "connection reset by peer",
+       11:  "resource deadlock avoided",
+       39:  "destination address required",
+       83:  "device error",
+       33:  "numerical argument out of domain",
+       69:  "disc quota exceeded",
+       17:  "file exists",
+       14:  "bad address",
+       27:  "file too large",
+       79:  "inappropriate file type or format",
+       64:  "host is down",
+       65:  "no route to host",
+       90:  "identifier removed",
+       92:  "illegal byte sequence",
+       36:  "operation now in progress",
+       4:   "interrupted system call",
+       22:  "invalid argument",
+       5:   "input/output error",
+       56:  "socket is already connected",
+       21:  "is a directory",
        103: "policy not found",
-       62: "too many levels of symbolic links",
-       24: "too many open files",
-       31: "too many links",
-       40: "message too long",
-       95: "EMULTIHOP (Reserved)",
-       63: "file name too long",
-       81: "need authenticator",
-       50: "network is down",
-       52: "network dropped connection on reset",
-       51: "network is unreachable",
-       23: "too many open files in system",
-       93: "attribute not found",
-       55: "no buffer space available",
-       96: "no message available on STREAM",
-       19: "operation not supported by device",
-       2: "no such file or directory",
-       8: "exec format error",
-       77: "no locks available",
-       97: "ENOLINK (Reserved)",
-       12: "cannot allocate memory",
-       91: "no message of desired type",
-       42: "protocol not available",
-       28: "no space left on device",
-       98: "no STREAM resources",
-       99: "not a STREAM",
-       78: "function not implemented",
-       15: "block device required",
-       57: "socket is not connected",
-       20: "not a directory",
-       66: "directory not empty",
-       38: "socket operation on non-socket",
-       45: "operation not supported",
-       25: "inappropriate ioctl for device",
-       6: "device not configured",
+       62:  "too many levels of symbolic links",
+       24:  "too many open files",
+       31:  "too many links",
+       40:  "message too long",
+       95:  "EMULTIHOP (Reserved)",
+       63:  "file name too long",
+       81:  "need authenticator",
+       50:  "network is down",
+       52:  "network dropped connection on reset",
+       51:  "network is unreachable",
+       23:  "too many open files in system",
+       93:  "attribute not found",
+       55:  "no buffer space available",
+       96:  "no message available on STREAM",
+       19:  "operation not supported by device",
+       2:   "no such file or directory",
+       8:   "exec format error",
+       77:  "no locks available",
+       97:  "ENOLINK (Reserved)",
+       12:  "cannot allocate memory",
+       91:  "no message of desired type",
+       42:  "protocol not available",
+       28:  "no space left on device",
+       98:  "no STREAM resources",
+       99:  "not a STREAM",
+       78:  "function not implemented",
+       15:  "block device required",
+       57:  "socket is not connected",
+       20:  "not a directory",
+       66:  "directory not empty",
+       38:  "socket operation on non-socket",
+       45:  "operation not supported",
+       25:  "inappropriate ioctl for device",
+       6:   "device not configured",
        102: "operation not supported on socket",
-       84: "value too large to be stored in data type",
-       1: "operation not permitted",
-       46: "protocol family not supported",
-       32: "broken pipe",
-       67: "too many processes",
-       76: "bad procedure for program",
-       75: "program version wrong",
-       74: "RPC prog. not avail",
+       84:  "value too large to be stored in data type",
+       1:   "operation not permitted",
+       46:  "protocol family not supported",
+       32:  "broken pipe",
+       67:  "too many processes",
+       76:  "bad procedure for program",
+       75:  "program version wrong",
+       74:  "RPC prog. not avail",
        100: "protocol error",
-       43: "protocol not supported",
-       41: "protocol wrong type for socket",
-       82: "device power is off",
-       34: "result too large",
-       71: "too many levels of remote in path",
-       30: "read-only file system",
-       73: "RPC version wrong",
-       87: "shared library version mismatch",
-       58: "can't send after socket shutdown",
-       44: "socket type not supported",
-       29: "illegal seek",
-       3: "no such process",
-       70: "stale NFS file handle",
+       43:  "protocol not supported",
+       41:  "protocol wrong type for socket",
+       82:  "device power is off",
+       34:  "result too large",
+       71:  "too many levels of remote in path",
+       30:  "read-only file system",
+       73:  "RPC version wrong",
+       87:  "shared library version mismatch",
+       58:  "can't send after socket shutdown",
+       44:  "socket type not supported",
+       29:  "illegal seek",
+       3:   "no such process",
+       70:  "stale NFS file handle",
        101: "STREAM ioctl timeout",
-       60: "operation timed out",
-       59: "too many references: can't splice",
-       26: "text file busy",
-       68: "too many users",
-       18: "cross-device link",
+       60:  "operation timed out",
+       59:  "too many references: can't splice",
+       26:  "text file busy",
+       68:  "too many users",
+       18:  "cross-device link",
 }
index 76660a84453e2134083d00ef6a866813be3d0e58..f7cc9cd2d422b742e0c2080cb6850a99d41ca218 100644 (file)
@@ -535,107 +535,107 @@ const (
 
 // Error table
 var errors = [...]string{
-       7: "argument list too long",
-       13: "permission denied",
-       48: "address already in use",
-       49: "can't assign requested address",
-       47: "address family not supported by protocol family",
-       35: "resource temporarily unavailable",
-       37: "operation already in progress",
-       80: "authentication error",
-       86: "bad CPU type in executable",
-       85: "bad executable (or shared library)",
-       9: "bad file descriptor",
-       88: "malformed Mach-o file",
-       94: "bad message",
-       72: "RPC struct is bad",
-       16: "resource busy",
-       89: "operation canceled",
-       10: "no child processes",
-       53: "software caused connection abort",
-       61: "connection refused",
-       54: "connection reset by peer",
-       11: "resource deadlock avoided",
-       39: "destination address required",
-       83: "device error",
-       33: "numerical argument out of domain",
-       69: "disc quota exceeded",
-       17: "file exists",
-       14: "bad address",
-       27: "file too large",
-       79: "inappropriate file type or format",
-       64: "host is down",
-       65: "no route to host",
-       90: "identifier removed",
-       92: "illegal byte sequence",
-       36: "operation now in progress",
-       4: "interrupted system call",
-       22: "invalid argument",
-       5: "input/output error",
-       56: "socket is already connected",
-       21: "is a directory",
+       7:   "argument list too long",
+       13:  "permission denied",
+       48:  "address already in use",
+       49:  "can't assign requested address",
+       47:  "address family not supported by protocol family",
+       35:  "resource temporarily unavailable",
+       37:  "operation already in progress",
+       80:  "authentication error",
+       86:  "bad CPU type in executable",
+       85:  "bad executable (or shared library)",
+       9:   "bad file descriptor",
+       88:  "malformed Mach-o file",
+       94:  "bad message",
+       72:  "RPC struct is bad",
+       16:  "resource busy",
+       89:  "operation canceled",
+       10:  "no child processes",
+       53:  "software caused connection abort",
+       61:  "connection refused",
+       54:  "connection reset by peer",
+       11:  "resource deadlock avoided",
+       39:  "destination address required",
+       83:  "device error",
+       33:  "numerical argument out of domain",
+       69:  "disc quota exceeded",
+       17:  "file exists",
+       14:  "bad address",
+       27:  "file too large",
+       79:  "inappropriate file type or format",
+       64:  "host is down",
+       65:  "no route to host",
+       90:  "identifier removed",
+       92:  "illegal byte sequence",
+       36:  "operation now in progress",
+       4:   "interrupted system call",
+       22:  "invalid argument",
+       5:   "input/output error",
+       56:  "socket is already connected",
+       21:  "is a directory",
        103: "policy not found",
-       62: "too many levels of symbolic links",
-       24: "too many open files",
-       31: "too many links",
-       40: "message too long",
-       95: "EMULTIHOP (Reserved)",
-       63: "file name too long",
-       81: "need authenticator",
-       50: "network is down",
-       52: "network dropped connection on reset",
-       51: "network is unreachable",
-       23: "too many open files in system",
-       93: "attribute not found",
-       55: "no buffer space available",
-       96: "no message available on STREAM",
-       19: "operation not supported by device",
-       2: "no such file or directory",
-       8: "exec format error",
-       77: "no locks available",
-       97: "ENOLINK (Reserved)",
-       12: "cannot allocate memory",
-       91: "no message of desired type",
-       42: "protocol not available",
-       28: "no space left on device",
-       98: "no STREAM resources",
-       99: "not a STREAM",
-       78: "function not implemented",
-       15: "block device required",
-       57: "socket is not connected",
-       20: "not a directory",
-       66: "directory not empty",
-       38: "socket operation on non-socket",
-       45: "operation not supported",
-       25: "inappropriate ioctl for device",
-       6: "device not configured",
+       62:  "too many levels of symbolic links",
+       24:  "too many open files",
+       31:  "too many links",
+       40:  "message too long",
+       95:  "EMULTIHOP (Reserved)",
+       63:  "file name too long",
+       81:  "need authenticator",
+       50:  "network is down",
+       52:  "network dropped connection on reset",
+       51:  "network is unreachable",
+       23:  "too many open files in system",
+       93:  "attribute not found",
+       55:  "no buffer space available",
+       96:  "no message available on STREAM",
+       19:  "operation not supported by device",
+       2:   "no such file or directory",
+       8:   "exec format error",
+       77:  "no locks available",
+       97:  "ENOLINK (Reserved)",
+       12:  "cannot allocate memory",
+       91:  "no message of desired type",
+       42:  "protocol not available",
+       28:  "no space left on device",
+       98:  "no STREAM resources",
+       99:  "not a STREAM",
+       78:  "function not implemented",
+       15:  "block device required",
+       57:  "socket is not connected",
+       20:  "not a directory",
+       66:  "directory not empty",
+       38:  "socket operation on non-socket",
+       45:  "operation not supported",
+       25:  "inappropriate ioctl for device",
+       6:   "device not configured",
        102: "operation not supported on socket",
-       84: "value too large to be stored in data type",
-       1: "operation not permitted",
-       46: "protocol family not supported",
-       32: "broken pipe",
-       67: "too many processes",
-       76: "bad procedure for program",
-       75: "program version wrong",
-       74: "RPC prog. not avail",
+       84:  "value too large to be stored in data type",
+       1:   "operation not permitted",
+       46:  "protocol family not supported",
+       32:  "broken pipe",
+       67:  "too many processes",
+       76:  "bad procedure for program",
+       75:  "program version wrong",
+       74:  "RPC prog. not avail",
        100: "protocol error",
-       43: "protocol not supported",
-       41: "protocol wrong type for socket",
-       82: "device power is off",
-       34: "result too large",
-       71: "too many levels of remote in path",
-       30: "read-only file system",
-       73: "RPC version wrong",
-       87: "shared library version mismatch",
-       58: "can't send after socket shutdown",
-       44: "socket type not supported",
-       29: "illegal seek",
-       3: "no such process",
-       70: "stale NFS file handle",
+       43:  "protocol not supported",
+       41:  "protocol wrong type for socket",
+       82:  "device power is off",
+       34:  "result too large",
+       71:  "too many levels of remote in path",
+       30:  "read-only file system",
+       73:  "RPC version wrong",
+       87:  "shared library version mismatch",
+       58:  "can't send after socket shutdown",
+       44:  "socket type not supported",
+       29:  "illegal seek",
+       3:   "no such process",
+       70:  "stale NFS file handle",
        101: "STREAM ioctl timeout",
-       60: "operation timed out",
-       59: "too many references: can't splice",
-       26: "text file busy",
-       68: "too many users",
-       18: "cross-device link",
+       60:  "operation timed out",
+       59:  "too many references: can't splice",
+       26:  "text file busy",
+       68:  "too many users",
+       18:  "cross-device link",
 }
index 4c1b828e54d808cf1ba3a7a802632497d3ba07ae..a519f3479fbc39cfad0d030bc2eab8a25c0659bd 100644 (file)
@@ -536,7 +536,7 @@ const (
 
 // Error table
 var errors = [...]string{
-       7: "argument list too long",
+       7:  "argument list too long",
        13: "permission denied",
        48: "address already in use",
        49: "can't assign requested address",
@@ -544,7 +544,7 @@ var errors = [...]string{
        35: "resource temporarily unavailable",
        37: "operation already in progress",
        80: "authentication error",
-       9: "bad file descriptor",
+       9:  "bad file descriptor",
        89: "bad message",
        72: "RPC struct is bad",
        16: "device busy",
@@ -567,9 +567,9 @@ var errors = [...]string{
        82: "identifier removed",
        86: "illegal byte sequence",
        36: "operation now in progress",
-       4: "interrupted system call",
+       4:  "interrupted system call",
        22: "invalid argument",
-       5: "input/output error",
+       5:  "input/output error",
        56: "socket is already connected",
        21: "is a directory",
        92: "protocol error",
@@ -587,8 +587,8 @@ var errors = [...]string{
        87: "attribute not found",
        55: "no buffer space available",
        19: "operation not supported by device",
-       2: "no such file or directory",
-       8: "exec format error",
+       2:  "no such file or directory",
+       8:  "exec format error",
        77: "no locks available",
        91: "link has been severed",
        12: "cannot allocate memory",
@@ -603,9 +603,9 @@ var errors = [...]string{
        38: "socket operation on non-socket",
        45: "operation not supported",
        25: "inappropriate ioctl for device",
-       6: "device not configured",
+       6:  "device not configured",
        84: "value too large to be stored in data type",
-       1: "operation not permitted",
+       1:  "operation not permitted",
        46: "protocol family not supported",
        32: "broken pipe",
        67: "too many processes",
@@ -621,7 +621,7 @@ var errors = [...]string{
        58: "can't send after socket shutdown",
        44: "socket type not supported",
        29: "illegal seek",
-       3: "no such process",
+       3:  "no such process",
        70: "stale NFS file handle",
        60: "operation timed out",
        59: "too many references: can't splice",
index 4c1b828e54d808cf1ba3a7a802632497d3ba07ae..a519f3479fbc39cfad0d030bc2eab8a25c0659bd 100644 (file)
@@ -536,7 +536,7 @@ const (
 
 // Error table
 var errors = [...]string{
-       7: "argument list too long",
+       7:  "argument list too long",
        13: "permission denied",
        48: "address already in use",
        49: "can't assign requested address",
@@ -544,7 +544,7 @@ var errors = [...]string{
        35: "resource temporarily unavailable",
        37: "operation already in progress",
        80: "authentication error",
-       9: "bad file descriptor",
+       9:  "bad file descriptor",
        89: "bad message",
        72: "RPC struct is bad",
        16: "device busy",
@@ -567,9 +567,9 @@ var errors = [...]string{
        82: "identifier removed",
        86: "illegal byte sequence",
        36: "operation now in progress",
-       4: "interrupted system call",
+       4:  "interrupted system call",
        22: "invalid argument",
-       5: "input/output error",
+       5:  "input/output error",
        56: "socket is already connected",
        21: "is a directory",
        92: "protocol error",
@@ -587,8 +587,8 @@ var errors = [...]string{
        87: "attribute not found",
        55: "no buffer space available",
        19: "operation not supported by device",
-       2: "no such file or directory",
-       8: "exec format error",
+       2:  "no such file or directory",
+       8:  "exec format error",
        77: "no locks available",
        91: "link has been severed",
        12: "cannot allocate memory",
@@ -603,9 +603,9 @@ var errors = [...]string{
        38: "socket operation on non-socket",
        45: "operation not supported",
        25: "inappropriate ioctl for device",
-       6: "device not configured",
+       6:  "device not configured",
        84: "value too large to be stored in data type",
-       1: "operation not permitted",
+       1:  "operation not permitted",
        46: "protocol family not supported",
        32: "broken pipe",
        67: "too many processes",
@@ -621,7 +621,7 @@ var errors = [...]string{
        58: "can't send after socket shutdown",
        44: "socket type not supported",
        29: "illegal seek",
-       3: "no such process",
+       3:  "no such process",
        70: "stale NFS file handle",
        60: "operation timed out",
        59: "too many references: can't splice",
index ba744a70c43cb40073a7f32927942444e6b5fc80..09ab33b30fdebeea48cb2fec3c69266c6eb36169 100644 (file)
@@ -526,134 +526,134 @@ const (
 
 // Error table
 var errors = [...]string{
-       7: "argument list too long",
-       13: "permission denied",
-       98: "address already in use",
-       99: "cannot assign requested address",
-       68: "advertise error",
-       97: "address family not supported by protocol",
-       11: "resource temporarily unavailable",
+       7:   "argument list too long",
+       13:  "permission denied",
+       98:  "address already in use",
+       99:  "cannot assign requested address",
+       68:  "advertise error",
+       97:  "address family not supported by protocol",
+       11:  "resource temporarily unavailable",
        114: "operation already in progress",
-       52: "invalid exchange",
-       9: "bad file descriptor",
-       77: "file descriptor in bad state",
-       74: "bad message",
-       53: "invalid request descriptor",
-       56: "invalid request code",
-       57: "invalid slot",
-       59: "bad font file format",
-       16: "device or resource busy",
+       52:  "invalid exchange",
+       9:   "bad file descriptor",
+       77:  "file descriptor in bad state",
+       74:  "bad message",
+       53:  "invalid request descriptor",
+       56:  "invalid request code",
+       57:  "invalid slot",
+       59:  "bad font file format",
+       16:  "device or resource busy",
        125: "operation canceled",
-       10: "no child processes",
-       44: "channel number out of range",
-       70: "communication error on send",
+       10:  "no child processes",
+       44:  "channel number out of range",
+       70:  "communication error on send",
        103: "software caused connection abort",
        111: "connection refused",
        104: "connection reset by peer",
-       35: "resource deadlock avoided",
-       89: "destination address required",
-       33: "numerical argument out of domain",
-       73: "RFS specific error",
+       35:  "resource deadlock avoided",
+       89:  "destination address required",
+       33:  "numerical argument out of domain",
+       73:  "RFS specific error",
        122: "disk quota exceeded",
-       17: "file exists",
-       14: "bad address",
-       27: "file too large",
+       17:  "file exists",
+       14:  "bad address",
+       27:  "file too large",
        112: "host is down",
        113: "no route to host",
-       43: "identifier removed",
-       84: "invalid or incomplete multibyte or wide character",
+       43:  "identifier removed",
+       84:  "invalid or incomplete multibyte or wide character",
        115: "operation now in progress",
-       4: "interrupted system call",
-       22: "invalid argument",
-       5: "input/output error",
+       4:   "interrupted system call",
+       22:  "invalid argument",
+       5:   "input/output error",
        106: "transport endpoint is already connected",
-       21: "is a directory",
+       21:  "is a directory",
        120: "is a named type file",
        127: "key has expired",
        129: "key was rejected by service",
        128: "key has been revoked",
-       51: "level 2 halted",
-       45: "level 2 not synchronized",
-       46: "level 3 halted",
-       47: "level 3 reset",
-       79: "can not access a needed shared library",
-       80: "accessing a corrupted shared library",
-       83: "cannot exec a shared library directly",
-       82: "attempting to link in too many shared libraries",
-       81: ".lib section in a.out corrupted",
-       48: "link number out of range",
-       40: "too many levels of symbolic links",
+       51:  "level 2 halted",
+       45:  "level 2 not synchronized",
+       46:  "level 3 halted",
+       47:  "level 3 reset",
+       79:  "can not access a needed shared library",
+       80:  "accessing a corrupted shared library",
+       83:  "cannot exec a shared library directly",
+       82:  "attempting to link in too many shared libraries",
+       81:  ".lib section in a.out corrupted",
+       48:  "link number out of range",
+       40:  "too many levels of symbolic links",
        124: "wrong medium type",
-       24: "too many open files",
-       31: "too many links",
-       90: "message too long",
-       72: "multihop attempted",
-       36: "file name too long",
+       24:  "too many open files",
+       31:  "too many links",
+       90:  "message too long",
+       72:  "multihop attempted",
+       36:  "file name too long",
        119: "no XENIX semaphores available",
        100: "network is down",
        102: "network dropped connection on reset",
        101: "network is unreachable",
-       23: "too many open files in system",
-       55: "no anode",
+       23:  "too many open files in system",
+       55:  "no anode",
        105: "no buffer space available",
-       50: "no CSI structure available",
-       61: "no data available",
-       19: "no such device",
-       2: "no such file or directory",
-       8: "exec format error",
+       50:  "no CSI structure available",
+       61:  "no data available",
+       19:  "no such device",
+       2:   "no such file or directory",
+       8:   "exec format error",
        126: "required key not available",
-       37: "no locks available",
-       67: "link has been severed",
+       37:  "no locks available",
+       67:  "link has been severed",
        123: "no medium found",
-       12: "cannot allocate memory",
-       42: "no message of desired type",
-       64: "machine is not on the network",
-       65: "package not installed",
-       92: "protocol not available",
-       28: "no space left on device",
-       63: "out of streams resources",
-       60: "device not a stream",
-       38: "function not implemented",
-       15: "block device required",
+       12:  "cannot allocate memory",
+       42:  "no message of desired type",
+       64:  "machine is not on the network",
+       65:  "package not installed",
+       92:  "protocol not available",
+       28:  "no space left on device",
+       63:  "out of streams resources",
+       60:  "device not a stream",
+       38:  "function not implemented",
+       15:  "block device required",
        107: "transport endpoint is not connected",
-       20: "not a directory",
-       39: "directory not empty",
+       20:  "not a directory",
+       39:  "directory not empty",
        118: "not a XENIX named type file",
        131: "state not recoverable",
-       88: "socket operation on non-socket",
-       95: "operation not supported",
-       25: "inappropriate ioctl for device",
-       76: "name not unique on network",
-       6: "no such device or address",
-       75: "value too large for defined data type",
+       88:  "socket operation on non-socket",
+       95:  "operation not supported",
+       25:  "inappropriate ioctl for device",
+       76:  "name not unique on network",
+       6:   "no such device or address",
+       75:  "value too large for defined data type",
        130: "owner died",
-       1: "operation not permitted",
-       96: "protocol family not supported",
-       32: "broken pipe",
-       71: "protocol error",
-       93: "protocol not supported",
-       91: "protocol wrong type for socket",
-       34: "numerical result out of range",
-       78: "remote address changed",
-       66: "object is remote",
+       1:   "operation not permitted",
+       96:  "protocol family not supported",
+       32:  "broken pipe",
+       71:  "protocol error",
+       93:  "protocol not supported",
+       91:  "protocol wrong type for socket",
+       34:  "numerical result out of range",
+       78:  "remote address changed",
+       66:  "object is remote",
        121: "remote I/O error",
-       85: "interrupted system call should be restarted",
+       85:  "interrupted system call should be restarted",
        132: "unknown error 132",
-       30: "read-only file system",
+       30:  "read-only file system",
        108: "cannot send after transport endpoint shutdown",
-       94: "socket type not supported",
-       29: "illegal seek",
-       3: "no such process",
-       69: "srmount error",
+       94:  "socket type not supported",
+       29:  "illegal seek",
+       3:   "no such process",
+       69:  "srmount error",
        116: "stale NFS file handle",
-       86: "streams pipe error",
-       62: "timer expired",
+       86:  "streams pipe error",
+       62:  "timer expired",
        110: "connection timed out",
        109: "too many references: cannot splice",
-       26: "text file busy",
+       26:  "text file busy",
        117: "structure needs cleaning",
-       49: "protocol driver not attached",
-       87: "too many users",
-       18: "invalid cross-device link",
-       54: "exchange full",
+       49:  "protocol driver not attached",
+       87:  "too many users",
+       18:  "invalid cross-device link",
+       54:  "exchange full",
 }
index ba744a70c43cb40073a7f32927942444e6b5fc80..09ab33b30fdebeea48cb2fec3c69266c6eb36169 100644 (file)
@@ -526,134 +526,134 @@ const (
 
 // Error table
 var errors = [...]string{
-       7: "argument list too long",
-       13: "permission denied",
-       98: "address already in use",
-       99: "cannot assign requested address",
-       68: "advertise error",
-       97: "address family not supported by protocol",
-       11: "resource temporarily unavailable",
+       7:   "argument list too long",
+       13:  "permission denied",
+       98:  "address already in use",
+       99:  "cannot assign requested address",
+       68:  "advertise error",
+       97:  "address family not supported by protocol",
+       11:  "resource temporarily unavailable",
        114: "operation already in progress",
-       52: "invalid exchange",
-       9: "bad file descriptor",
-       77: "file descriptor in bad state",
-       74: "bad message",
-       53: "invalid request descriptor",
-       56: "invalid request code",
-       57: "invalid slot",
-       59: "bad font file format",
-       16: "device or resource busy",
+       52:  "invalid exchange",
+       9:   "bad file descriptor",
+       77:  "file descriptor in bad state",
+       74:  "bad message",
+       53:  "invalid request descriptor",
+       56:  "invalid request code",
+       57:  "invalid slot",
+       59:  "bad font file format",
+       16:  "device or resource busy",
        125: "operation canceled",
-       10: "no child processes",
-       44: "channel number out of range",
-       70: "communication error on send",
+       10:  "no child processes",
+       44:  "channel number out of range",
+       70:  "communication error on send",
        103: "software caused connection abort",
        111: "connection refused",
        104: "connection reset by peer",
-       35: "resource deadlock avoided",
-       89: "destination address required",
-       33: "numerical argument out of domain",
-       73: "RFS specific error",
+       35:  "resource deadlock avoided",
+       89:  "destination address required",
+       33:  "numerical argument out of domain",
+       73:  "RFS specific error",
        122: "disk quota exceeded",
-       17: "file exists",
-       14: "bad address",
-       27: "file too large",
+       17:  "file exists",
+       14:  "bad address",
+       27:  "file too large",
        112: "host is down",
        113: "no route to host",
-       43: "identifier removed",
-       84: "invalid or incomplete multibyte or wide character",
+       43:  "identifier removed",
+       84:  "invalid or incomplete multibyte or wide character",
        115: "operation now in progress",
-       4: "interrupted system call",
-       22: "invalid argument",
-       5: "input/output error",
+       4:   "interrupted system call",
+       22:  "invalid argument",
+       5:   "input/output error",
        106: "transport endpoint is already connected",
-       21: "is a directory",
+       21:  "is a directory",
        120: "is a named type file",
        127: "key has expired",
        129: "key was rejected by service",
        128: "key has been revoked",
-       51: "level 2 halted",
-       45: "level 2 not synchronized",
-       46: "level 3 halted",
-       47: "level 3 reset",
-       79: "can not access a needed shared library",
-       80: "accessing a corrupted shared library",
-       83: "cannot exec a shared library directly",
-       82: "attempting to link in too many shared libraries",
-       81: ".lib section in a.out corrupted",
-       48: "link number out of range",
-       40: "too many levels of symbolic links",
+       51:  "level 2 halted",
+       45:  "level 2 not synchronized",
+       46:  "level 3 halted",
+       47:  "level 3 reset",
+       79:  "can not access a needed shared library",
+       80:  "accessing a corrupted shared library",
+       83:  "cannot exec a shared library directly",
+       82:  "attempting to link in too many shared libraries",
+       81:  ".lib section in a.out corrupted",
+       48:  "link number out of range",
+       40:  "too many levels of symbolic links",
        124: "wrong medium type",
-       24: "too many open files",
-       31: "too many links",
-       90: "message too long",
-       72: "multihop attempted",
-       36: "file name too long",
+       24:  "too many open files",
+       31:  "too many links",
+       90:  "message too long",
+       72:  "multihop attempted",
+       36:  "file name too long",
        119: "no XENIX semaphores available",
        100: "network is down",
        102: "network dropped connection on reset",
        101: "network is unreachable",
-       23: "too many open files in system",
-       55: "no anode",
+       23:  "too many open files in system",
+       55:  "no anode",
        105: "no buffer space available",
-       50: "no CSI structure available",
-       61: "no data available",
-       19: "no such device",
-       2: "no such file or directory",
-       8: "exec format error",
+       50:  "no CSI structure available",
+       61:  "no data available",
+       19:  "no such device",
+       2:   "no such file or directory",
+       8:   "exec format error",
        126: "required key not available",
-       37: "no locks available",
-       67: "link has been severed",
+       37:  "no locks available",
+       67:  "link has been severed",
        123: "no medium found",
-       12: "cannot allocate memory",
-       42: "no message of desired type",
-       64: "machine is not on the network",
-       65: "package not installed",
-       92: "protocol not available",
-       28: "no space left on device",
-       63: "out of streams resources",
-       60: "device not a stream",
-       38: "function not implemented",
-       15: "block device required",
+       12:  "cannot allocate memory",
+       42:  "no message of desired type",
+       64:  "machine is not on the network",
+       65:  "package not installed",
+       92:  "protocol not available",
+       28:  "no space left on device",
+       63:  "out of streams resources",
+       60:  "device not a stream",
+       38:  "function not implemented",
+       15:  "block device required",
        107: "transport endpoint is not connected",
-       20: "not a directory",
-       39: "directory not empty",
+       20:  "not a directory",
+       39:  "directory not empty",
        118: "not a XENIX named type file",
        131: "state not recoverable",
-       88: "socket operation on non-socket",
-       95: "operation not supported",
-       25: "inappropriate ioctl for device",
-       76: "name not unique on network",
-       6: "no such device or address",
-       75: "value too large for defined data type",
+       88:  "socket operation on non-socket",
+       95:  "operation not supported",
+       25:  "inappropriate ioctl for device",
+       76:  "name not unique on network",
+       6:   "no such device or address",
+       75:  "value too large for defined data type",
        130: "owner died",
-       1: "operation not permitted",
-       96: "protocol family not supported",
-       32: "broken pipe",
-       71: "protocol error",
-       93: "protocol not supported",
-       91: "protocol wrong type for socket",
-       34: "numerical result out of range",
-       78: "remote address changed",
-       66: "object is remote",
+       1:   "operation not permitted",
+       96:  "protocol family not supported",
+       32:  "broken pipe",
+       71:  "protocol error",
+       93:  "protocol not supported",
+       91:  "protocol wrong type for socket",
+       34:  "numerical result out of range",
+       78:  "remote address changed",
+       66:  "object is remote",
        121: "remote I/O error",
-       85: "interrupted system call should be restarted",
+       85:  "interrupted system call should be restarted",
        132: "unknown error 132",
-       30: "read-only file system",
+       30:  "read-only file system",
        108: "cannot send after transport endpoint shutdown",
-       94: "socket type not supported",
-       29: "illegal seek",
-       3: "no such process",
-       69: "srmount error",
+       94:  "socket type not supported",
+       29:  "illegal seek",
+       3:   "no such process",
+       69:  "srmount error",
        116: "stale NFS file handle",
-       86: "streams pipe error",
-       62: "timer expired",
+       86:  "streams pipe error",
+       62:  "timer expired",
        110: "connection timed out",
        109: "too many references: cannot splice",
-       26: "text file busy",
+       26:  "text file busy",
        117: "structure needs cleaning",
-       49: "protocol driver not attached",
-       87: "too many users",
-       18: "invalid cross-device link",
-       54: "exchange full",
+       49:  "protocol driver not attached",
+       87:  "too many users",
+       18:  "invalid cross-device link",
+       54:  "exchange full",
 }
index 19d676074d7a219a198e13da4888564eff8b3635..b768daa098dd7874a1413561a1376444770aa1c3 100644 (file)
@@ -187,133 +187,133 @@ const (
 
 // Error table
 var errors = [...]string{
-       72: "multihop attempted",
-       49: "protocol driver not attached",
-       97: "address family not supported by protocol",
-       78: "remote address changed",
-       13: "permission denied",
-       47: "level 3 reset",
-       89: "destination address required",
-       84: "invalid or incomplete multibyte or wide character",
-       29: "illegal seek",
-       31: "too many links",
+       72:  "multihop attempted",
+       49:  "protocol driver not attached",
+       97:  "address family not supported by protocol",
+       78:  "remote address changed",
+       13:  "permission denied",
+       47:  "level 3 reset",
+       89:  "destination address required",
+       84:  "invalid or incomplete multibyte or wide character",
+       29:  "illegal seek",
+       31:  "too many links",
        130: "owner died",
-       25: "inappropriate ioctl for device",
-       52: "invalid exchange",
-       9: "bad file descriptor",
-       53: "invalid request descriptor",
-       68: "advertise error",
-       34: "numerical result out of range",
+       25:  "inappropriate ioctl for device",
+       52:  "invalid exchange",
+       9:   "bad file descriptor",
+       53:  "invalid request descriptor",
+       68:  "advertise error",
+       34:  "numerical result out of range",
        125: "operation canceled",
-       26: "text file busy",
-       12: "cannot allocate memory",
+       26:  "text file busy",
+       12:  "cannot allocate memory",
        115: "operation now in progress",
-       39: "directory not empty",
-       15: "block device required",
-       91: "protocol wrong type for socket",
-       85: "interrupted system call should be restarted",
+       39:  "directory not empty",
+       15:  "block device required",
+       91:  "protocol wrong type for socket",
+       85:  "interrupted system call should be restarted",
        120: "is a named type file",
-       42: "no message of desired type",
+       42:  "no message of desired type",
        114: "operation already in progress",
        110: "connection timed out",
-       61: "no data available",
-       4: "interrupted system call",
-       67: "link has been severed",
-       1: "operation not permitted",
-       40: "too many levels of symbolic links",
+       61:  "no data available",
+       4:   "interrupted system call",
+       67:  "link has been severed",
+       1:   "operation not permitted",
+       40:  "too many levels of symbolic links",
        100: "network is down",
        116: "stale NFS file handle",
-       88: "socket operation on non-socket",
-       63: "out of streams resources",
-       10: "no child processes",
-       48: "link number out of range",
-       32: "broken pipe",
-       74: "bad message",
-       59: "bad font file format",
-       66: "object is remote",
+       88:  "socket operation on non-socket",
+       63:  "out of streams resources",
+       10:  "no child processes",
+       48:  "link number out of range",
+       32:  "broken pipe",
+       74:  "bad message",
+       59:  "bad font file format",
+       66:  "object is remote",
        109: "too many references: cannot splice",
-       96: "protocol family not supported",
-       64: "machine is not on the network",
-       54: "exchange full",
-       57: "invalid slot",
+       96:  "protocol family not supported",
+       64:  "machine is not on the network",
+       54:  "exchange full",
+       57:  "invalid slot",
        118: "not a XENIX named type file",
-       50: "no CSI structure available",
-       98: "address already in use",
+       50:  "no CSI structure available",
+       98:  "address already in use",
        102: "network dropped connection on reset",
-       21: "is a directory",
-       43: "identifier removed",
-       70: "communication error on send",
-       77: "file descriptor in bad state",
-       51: "level 2 halted",
+       21:  "is a directory",
+       43:  "identifier removed",
+       70:  "communication error on send",
+       77:  "file descriptor in bad state",
+       51:  "level 2 halted",
        126: "required key not available",
-       22: "invalid argument",
+       22:  "invalid argument",
        108: "cannot send after transport endpoint shutdown",
        129: "key was rejected by service",
-       81: ".lib section in a.out corrupted",
+       81:  ".lib section in a.out corrupted",
        119: "no XENIX semaphores available",
-       75: "value too large for defined data type",
+       75:  "value too large for defined data type",
        117: "structure needs cleaning",
        123: "no medium found",
-       16: "device or resource busy",
-       71: "protocol error",
-       19: "no such device",
+       16:  "device or resource busy",
+       71:  "protocol error",
+       19:  "no such device",
        127: "key has expired",
-       30: "read-only file system",
-       79: "can not access a needed shared library",
-       7: "argument list too long",
-       35: "resource deadlock avoided",
-       20: "not a directory",
+       30:  "read-only file system",
+       79:  "can not access a needed shared library",
+       7:   "argument list too long",
+       35:  "resource deadlock avoided",
+       20:  "not a directory",
        104: "connection reset by peer",
-       6: "no such device or address",
-       56: "invalid request code",
-       36: "file name too long",
-       94: "socket type not supported",
-       83: "cannot exec a shared library directly",
-       73: "RFS specific error",
-       99: "cannot assign requested address",
-       62: "timer expired",
-       93: "protocol not supported",
+       6:   "no such device or address",
+       56:  "invalid request code",
+       36:  "file name too long",
+       94:  "socket type not supported",
+       83:  "cannot exec a shared library directly",
+       73:  "RFS specific error",
+       99:  "cannot assign requested address",
+       62:  "timer expired",
+       93:  "protocol not supported",
        131: "state not recoverable",
-       5: "input/output error",
+       5:   "input/output error",
        101: "network is unreachable",
-       18: "invalid cross-device link",
+       18:  "invalid cross-device link",
        122: "disk quota exceeded",
        121: "remote I/O error",
-       28: "no space left on device",
-       8: "exec format error",
-       90: "message too long",
-       33: "numerical argument out of domain",
-       60: "device not a stream",
-       27: "file too large",
-       3: "no such process",
-       44: "channel number out of range",
+       28:  "no space left on device",
+       8:   "exec format error",
+       90:  "message too long",
+       33:  "numerical argument out of domain",
+       60:  "device not a stream",
+       27:  "file too large",
+       3:   "no such process",
+       44:  "channel number out of range",
        112: "host is down",
-       37: "no locks available",
-       23: "too many open files in system",
-       38: "function not implemented",
+       37:  "no locks available",
+       23:  "too many open files in system",
+       38:  "function not implemented",
        107: "transport endpoint is not connected",
-       95: "operation not supported",
-       69: "srmount error",
+       95:  "operation not supported",
+       69:  "srmount error",
        103: "software caused connection abort",
-       55: "no anode",
+       55:  "no anode",
        106: "transport endpoint is already connected",
-       87: "too many users",
-       92: "protocol not available",
-       24: "too many open files",
+       87:  "too many users",
+       92:  "protocol not available",
+       24:  "too many open files",
        105: "no buffer space available",
-       46: "level 3 halted",
-       14: "bad address",
-       11: "resource temporarily unavailable",
-       80: "accessing a corrupted shared library",
-       86: "streams pipe error",
+       46:  "level 3 halted",
+       14:  "bad address",
+       11:  "resource temporarily unavailable",
+       80:  "accessing a corrupted shared library",
+       86:  "streams pipe error",
        111: "connection refused",
-       82: "attempting to link in too many shared libraries",
-       17: "file exists",
-       45: "level 2 not synchronized",
-       2: "no such file or directory",
-       65: "package not installed",
+       82:  "attempting to link in too many shared libraries",
+       17:  "file exists",
+       45:  "level 2 not synchronized",
+       2:   "no such file or directory",
+       65:  "package not installed",
        128: "key has been revoked",
        113: "no route to host",
-       76: "name not unique on network",
+       76:  "name not unique on network",
        124: "wrong medium type",
 }
index 2c1dff8cf8bd180677eb68ae9a8d00b8691d25f3..546e02754ca1e5512a8d7b9816f67ff2bbadaa60 100644 (file)
@@ -129,118 +129,118 @@ const (
 
 // Error table
 var errors = [...]string{
-       EPERM: "operation not permitted",
-       ENOENT: "no such file or directory",
-       ESRCH: "no such process",
-       EINTR: "interrupted system call",
-       EIO: "I/O error",
-       ENXIO: "no such device or address",
-       E2BIG: "argument list too long",
-       ENOEXEC: "exec format error",
-       EBADF: "bad file number",
-       ECHILD: "no child processes",
-       EAGAIN: "try again",
-       ENOMEM: "out of memory",
-       EACCES: "permission denied",
-       EFAULT: "bad address",
-       EBUSY: "device or resource busy",
-       EEXIST: "file exists",
-       EXDEV: "cross-device link",
-       ENODEV: "no such device",
-       ENOTDIR: "not a directory",
-       EISDIR: "is a directory",
-       EINVAL: "invalid argument",
-       ENFILE: "file table overflow",
-       EMFILE: "too many open files",
-       ENOTTY: "not a typewriter",
-       EFBIG: "file too large",
-       ENOSPC: "no space left on device",
-       ESPIPE: "illegal seek",
-       EROFS: "read-only file system",
-       EMLINK: "too many links",
-       EPIPE: "broken pipe",
+       EPERM:        "operation not permitted",
+       ENOENT:       "no such file or directory",
+       ESRCH:        "no such process",
+       EINTR:        "interrupted system call",
+       EIO:          "I/O error",
+       ENXIO:        "no such device or address",
+       E2BIG:        "argument list too long",
+       ENOEXEC:      "exec format error",
+       EBADF:        "bad file number",
+       ECHILD:       "no child processes",
+       EAGAIN:       "try again",
+       ENOMEM:       "out of memory",
+       EACCES:       "permission denied",
+       EFAULT:       "bad address",
+       EBUSY:        "device or resource busy",
+       EEXIST:       "file exists",
+       EXDEV:        "cross-device link",
+       ENODEV:       "no such device",
+       ENOTDIR:      "not a directory",
+       EISDIR:       "is a directory",
+       EINVAL:       "invalid argument",
+       ENFILE:       "file table overflow",
+       EMFILE:       "too many open files",
+       ENOTTY:       "not a typewriter",
+       EFBIG:        "file too large",
+       ENOSPC:       "no space left on device",
+       ESPIPE:       "illegal seek",
+       EROFS:        "read-only file system",
+       EMLINK:       "too many links",
+       EPIPE:        "broken pipe",
        ENAMETOOLONG: "file name too long",
-       ENOSYS: "function not implemented",
-       EDQUOT: "quota exceeded",
-       EDOM: "math arg out of domain of func",
-       ERANGE: "math result not representable",
-       ENOMSG: "no message of desired type",
-       ECHRNG: "channel number out of range",
-       EL3HLT: "level 3 halted",
-       EL3RST: "level 3 reset",
-       ELNRNG: "link number out of range",
-       EUNATCH: "protocol driver not attached",
-       ENOCSI: "no CSI structure available",
-       EL2HLT: "level 2 halted",
-       EDEADLK: "deadlock condition",
-       ENOLCK: "no record locks available",
-       EBADE: "invalid exchange",
-       EBADR: "invalid request descriptor",
-       EXFULL: "exchange full",
-       ENOANO: "no anode",
-       EBADRQC: "invalid request code",
-       EBADSLT: "invalid slot",
-       EBFONT: "bad font file fmt",
-       ENOSTR: "device not a stream",
-       ENODATA: "no data (for no delay io)",
-       ETIME: "timer expired",
-       ENOSR: "out of streams resources",
-       ENONET: "machine is not on the network",
-       ENOPKG: "package not installed",
-       EREMOTE: "the object is remote",
-       ENOLINK: "the link has been severed",
-       EADV: "advertise error",
-       ESRMNT: "srmount error",
-       ECOMM: "communication error on send",
-       EPROTO: "protocol error",
-       EMULTIHOP: "multihop attempted",
-       ELBIN: "inode is remote (not really error)",
-       EDOTDOT: "cross mount point (not really error)",
-       EBADMSG: "trying to read unreadable message",
-       EFTYPE: "inappropriate file type or format",
-       ENOTUNIQ: "given log. name not unique",
-       EBADFD: "f.d. invalid for this operation",
-       EREMCHG: "remote address changed",
-       ELIBACC: "can't access a needed shared lib",
-       ELIBBAD: "accessing a corrupted shared lib",
-       ELIBSCN: ".lib section in a.out corrupted",
-       ELIBMAX: "attempting to link in too many libs",
-       ELIBEXEC: "attempting to exec a shared library",
-       ENMFILE: "no more files",
-       ENOTEMPTY: "directory not empty",
-       ELOOP: "too many symbolic links",
-       EOPNOTSUPP: "operation not supported on transport endpoint",
+       ENOSYS:       "function not implemented",
+       EDQUOT:       "quota exceeded",
+       EDOM:         "math arg out of domain of func",
+       ERANGE:       "math result not representable",
+       ENOMSG:       "no message of desired type",
+       ECHRNG:       "channel number out of range",
+       EL3HLT:       "level 3 halted",
+       EL3RST:       "level 3 reset",
+       ELNRNG:       "link number out of range",
+       EUNATCH:      "protocol driver not attached",
+       ENOCSI:       "no CSI structure available",
+       EL2HLT:       "level 2 halted",
+       EDEADLK:      "deadlock condition",
+       ENOLCK:       "no record locks available",
+       EBADE:        "invalid exchange",
+       EBADR:        "invalid request descriptor",
+       EXFULL:       "exchange full",
+       ENOANO:       "no anode",
+       EBADRQC:      "invalid request code",
+       EBADSLT:      "invalid slot",
+       EBFONT:       "bad font file fmt",
+       ENOSTR:       "device not a stream",
+       ENODATA:      "no data (for no delay io)",
+       ETIME:        "timer expired",
+       ENOSR:        "out of streams resources",
+       ENONET:       "machine is not on the network",
+       ENOPKG:       "package not installed",
+       EREMOTE:      "the object is remote",
+       ENOLINK:      "the link has been severed",
+       EADV:         "advertise error",
+       ESRMNT:       "srmount error",
+       ECOMM:        "communication error on send",
+       EPROTO:       "protocol error",
+       EMULTIHOP:    "multihop attempted",
+       ELBIN:        "inode is remote (not really error)",
+       EDOTDOT:      "cross mount point (not really error)",
+       EBADMSG:      "trying to read unreadable message",
+       EFTYPE:       "inappropriate file type or format",
+       ENOTUNIQ:     "given log. name not unique",
+       EBADFD:       "f.d. invalid for this operation",
+       EREMCHG:      "remote address changed",
+       ELIBACC:      "can't access a needed shared lib",
+       ELIBBAD:      "accessing a corrupted shared lib",
+       ELIBSCN:      ".lib section in a.out corrupted",
+       ELIBMAX:      "attempting to link in too many libs",
+       ELIBEXEC:     "attempting to exec a shared library",
+       ENMFILE:      "no more files",
+       ENOTEMPTY:    "directory not empty",
+       ELOOP:        "too many symbolic links",
+       EOPNOTSUPP:   "operation not supported on transport endpoint",
        EPFNOSUPPORT: "protocol family not supported",
-       ECONNRESET: "connection reset by peer",
-       ENOBUFS: "no buffer space available",
+       ECONNRESET:   "connection reset by peer",
+       ENOBUFS:      "no buffer space available",
        EAFNOSUPPORT: "address family not supported by protocol family",
-       EPROTOTYPE: "protocol wrong type for socket",
-       ENOTSOCK: "socket operation on non-socket",
-       ENOPROTOOPT: "protocol not available",
-       ESHUTDOWN: "can't send after socket shutdown",
-       ECONNREFUSED: "connection refused",
-       EADDRINUSE: "address already in use",
-       ECONNABORTED: "connection aborted",
-       ENETUNREACH: "network is unreachable",
-       ENETDOWN: "network interface is not configured",
-       ETIMEDOUT: "connection timed out",
-       EHOSTDOWN: "host is down",
-       EHOSTUNREACH: "host is unreachable",
-       EINPROGRESS: "connection already in progress",
-       EALREADY: "socket already connected",
-       EDESTADDRREQ: "destination address required",
+       EPROTOTYPE:      "protocol wrong type for socket",
+       ENOTSOCK:        "socket operation on non-socket",
+       ENOPROTOOPT:     "protocol not available",
+       ESHUTDOWN:       "can't send after socket shutdown",
+       ECONNREFUSED:    "connection refused",
+       EADDRINUSE:      "address already in use",
+       ECONNABORTED:    "connection aborted",
+       ENETUNREACH:     "network is unreachable",
+       ENETDOWN:        "network interface is not configured",
+       ETIMEDOUT:       "connection timed out",
+       EHOSTDOWN:       "host is down",
+       EHOSTUNREACH:    "host is unreachable",
+       EINPROGRESS:     "connection already in progress",
+       EALREADY:        "socket already connected",
+       EDESTADDRREQ:    "destination address required",
        EPROTONOSUPPORT: "unknown protocol",
        ESOCKTNOSUPPORT: "socket type not supported",
-       EADDRNOTAVAIL: "address not available",
-       EISCONN: "socket is already connected",
-       ENOTCONN: "socket is not connected",
-       ENOMEDIUM: "no medium (in tape drive)",
-       ENOSHARE: "no such host or network path",
-       ECASECLASH: "filename exists with different case",
-       EOVERFLOW: "value too large for defined data type",
-       ECANCELED: "operation canceled.",
-       EL2NSYNC: "level 2 not synchronized",
-       EIDRM: "identifier removed",
-       EMSGSIZE: "message too long",
-       ENACL: "not supported by native client",
+       EADDRNOTAVAIL:   "address not available",
+       EISCONN:         "socket is already connected",
+       ENOTCONN:        "socket is not connected",
+       ENOMEDIUM:       "no medium (in tape drive)",
+       ENOSHARE:        "no such host or network path",
+       ECASECLASH:      "filename exists with different case",
+       EOVERFLOW:       "value too large for defined data type",
+       ECANCELED:       "operation canceled.",
+       EL2NSYNC:        "level 2 not synchronized",
+       EIDRM:           "identifier removed",
+       EMSGSIZE:        "message too long",
+       ENACL:           "not supported by native client",
 }
index 1fa55dc8d9fcc9802e1be4d3bd85a54a086a1062..cbe21f5e2e3cf001777116ecf9812e65deaa49f8 100644 (file)
@@ -107,8 +107,8 @@ type FormatterMap map[string]func(io.Writer, interface{}, string)
 // Built-in formatters.
 var builtins = FormatterMap{
        "html": HTMLFormatter,
-       "str": StringFormatter,
-       "": StringFormatter,
+       "str":  StringFormatter,
+       "":     StringFormatter,
 }
 
 // The parsed state of a template is a vector of xxxElement structs.
index 31cf318cfc56366c8b638972d8fd69030ddf7265..a1163d1596563136a0bcd180a8a27578d56a116b 100644 (file)
@@ -82,7 +82,7 @@ func writer(f func(interface{}) string) func(io.Writer, interface{}, string) {
 
 var formatters = FormatterMap{
        "uppercase": writer(uppercase),
-       "+1": writer(plus1),
+       "+1":        writer(plus1),
 }
 
 var tests = []*Test{
index 10e4fae6da2b3e54022a9397b0593edfe771b08f..18990b3541e3a1ee55da8a4a848b648ca93ca73b 100644 (file)
@@ -9,36 +9,36 @@ const Version = "5.2.0"
 
 // Categories is the set of Unicode data tables.
 var Categories = map[string][]Range{
-       "Lm": Lm,
-       "Ll": Ll,
-       "Me": Me,
-       "Mc": Mc,
-       "Mn": Mn,
-       "Zl": Zl,
+       "Lm":     Lm,
+       "Ll":     Ll,
+       "Me":     Me,
+       "Mc":     Mc,
+       "Mn":     Mn,
+       "Zl":     Zl,
        "letter": letter,
-       "Zp": Zp,
-       "Zs": Zs,
-       "Cs": Cs,
-       "Co": Co,
-       "Cf": Cf,
-       "Cc": Cc,
-       "Po": Po,
-       "Pi": Pi,
-       "Pf": Pf,
-       "Pe": Pe,
-       "Pd": Pd,
-       "Pc": Pc,
-       "Ps": Ps,
-       "Nd": Nd,
-       "Nl": Nl,
-       "No": No,
-       "So": So,
-       "Sm": Sm,
-       "Sk": Sk,
-       "Sc": Sc,
-       "Lu": Lu,
-       "Lt": Lt,
-       "Lo": Lo,
+       "Zp":     Zp,
+       "Zs":     Zs,
+       "Cs":     Cs,
+       "Co":     Co,
+       "Cf":     Cf,
+       "Cc":     Cc,
+       "Po":     Po,
+       "Pi":     Pi,
+       "Pf":     Pf,
+       "Pe":     Pe,
+       "Pd":     Pd,
+       "Pc":     Pc,
+       "Ps":     Ps,
+       "Nd":     Nd,
+       "Nl":     Nl,
+       "No":     No,
+       "So":     So,
+       "Sm":     Sm,
+       "Sk":     Sk,
+       "Sc":     Sc,
+       "Lu":     Lu,
+       "Lt":     Lt,
+       "Lo":     Lo,
 }
 
 var _Lm = []Range{
@@ -1963,98 +1963,98 @@ var (
 
 // Scripts is the set of Unicode script tables.
 var Scripts = map[string][]Range{
-       "Katakana": Katakana,
-       "Malayalam": Malayalam,
-       "Phags_Pa": Phags_Pa,
+       "Katakana":               Katakana,
+       "Malayalam":              Malayalam,
+       "Phags_Pa":               Phags_Pa,
        "Inscriptional_Parthian": Inscriptional_Parthian,
-       "Latin": Latin,
-       "Inscriptional_Pahlavi": Inscriptional_Pahlavi,
-       "Osmanya": Osmanya,
-       "Khmer": Khmer,
-       "Inherited": Inherited,
-       "Telugu": Telugu,
-       "Samaritan": Samaritan,
-       "Bopomofo": Bopomofo,
-       "Imperial_Aramaic": Imperial_Aramaic,
-       "Kaithi": Kaithi,
-       "Old_South_Arabian": Old_South_Arabian,
-       "Kayah_Li": Kayah_Li,
-       "New_Tai_Lue": New_Tai_Lue,
-       "Tai_Le": Tai_Le,
-       "Kharoshthi": Kharoshthi,
-       "Common": Common,
-       "Kannada": Kannada,
-       "Old_Turkic": Old_Turkic,
-       "Tamil": Tamil,
-       "Tagalog": Tagalog,
-       "Arabic": Arabic,
-       "Tagbanwa": Tagbanwa,
-       "Canadian_Aboriginal": Canadian_Aboriginal,
-       "Tibetan": Tibetan,
-       "Coptic": Coptic,
-       "Hiragana": Hiragana,
-       "Limbu": Limbu,
-       "Egyptian_Hieroglyphs": Egyptian_Hieroglyphs,
-       "Avestan": Avestan,
-       "Myanmar": Myanmar,
-       "Armenian": Armenian,
-       "Sinhala": Sinhala,
-       "Bengali": Bengali,
-       "Greek": Greek,
-       "Cham": Cham,
-       "Hebrew": Hebrew,
-       "Meetei_Mayek": Meetei_Mayek,
-       "Saurashtra": Saurashtra,
-       "Hangul": Hangul,
-       "Runic": Runic,
-       "Deseret": Deseret,
-       "Lisu": Lisu,
-       "Sundanese": Sundanese,
-       "Glagolitic": Glagolitic,
-       "Oriya": Oriya,
-       "Buhid": Buhid,
-       "Ethiopic": Ethiopic,
-       "Javanese": Javanese,
-       "Syloti_Nagri": Syloti_Nagri,
-       "Vai": Vai,
-       "Cherokee": Cherokee,
-       "Ogham": Ogham,
-       "Syriac": Syriac,
-       "Gurmukhi": Gurmukhi,
-       "Tai_Tham": Tai_Tham,
-       "Ol_Chiki": Ol_Chiki,
-       "Mongolian": Mongolian,
-       "Hanunoo": Hanunoo,
-       "Cypriot": Cypriot,
-       "Buginese": Buginese,
-       "Bamum": Bamum,
-       "Lepcha": Lepcha,
-       "Thaana": Thaana,
-       "Old_Persian": Old_Persian,
-       "Cuneiform": Cuneiform,
-       "Rejang": Rejang,
-       "Georgian": Georgian,
-       "Shavian": Shavian,
-       "Lycian": Lycian,
-       "Nko": Nko,
-       "Yi": Yi,
-       "Lao": Lao,
-       "Linear_B": Linear_B,
-       "Old_Italic": Old_Italic,
-       "Tai_Viet": Tai_Viet,
-       "Devanagari": Devanagari,
-       "Lydian": Lydian,
-       "Tifinagh": Tifinagh,
-       "Ugaritic": Ugaritic,
-       "Thai": Thai,
-       "Cyrillic": Cyrillic,
-       "Gujarati": Gujarati,
-       "Carian": Carian,
-       "Phoenician": Phoenician,
-       "Balinese": Balinese,
-       "Braille": Braille,
-       "Han": Han,
-       "Gothic": Gothic,
+       "Latin":                  Latin,
+       "Inscriptional_Pahlavi":  Inscriptional_Pahlavi,
+       "Osmanya":                Osmanya,
+       "Khmer":                  Khmer,
+       "Inherited":              Inherited,
+       "Telugu":                 Telugu,
+       "Samaritan":              Samaritan,
+       "Bopomofo":               Bopomofo,
+       "Imperial_Aramaic":       Imperial_Aramaic,
+       "Kaithi":                 Kaithi,
+       "Old_South_Arabian":      Old_South_Arabian,
+       "Kayah_Li":               Kayah_Li,
+       "New_Tai_Lue":            New_Tai_Lue,
+       "Tai_Le":                 Tai_Le,
+       "Kharoshthi":             Kharoshthi,
+       "Common":                 Common,
+       "Kannada":                Kannada,
+       "Old_Turkic":             Old_Turkic,
+       "Tamil":                  Tamil,
+       "Tagalog":                Tagalog,
+       "Arabic":                 Arabic,
+       "Tagbanwa":               Tagbanwa,
+       "Canadian_Aboriginal":    Canadian_Aboriginal,
+       "Tibetan":                Tibetan,
+       "Coptic":                 Coptic,
+       "Hiragana":               Hiragana,
+       "Limbu":                  Limbu,
+       "Egyptian_Hieroglyphs":   Egyptian_Hieroglyphs,
+       "Avestan":                Avestan,
+       "Myanmar":                Myanmar,
+       "Armenian":               Armenian,
+       "Sinhala":                Sinhala,
+       "Bengali":                Bengali,
+       "Greek":                  Greek,
+       "Cham":                   Cham,
+       "Hebrew":                 Hebrew,
+       "Meetei_Mayek":           Meetei_Mayek,
+       "Saurashtra":             Saurashtra,
+       "Hangul":                 Hangul,
+       "Runic":                  Runic,
+       "Deseret":                Deseret,
+       "Lisu":                   Lisu,
+       "Sundanese":              Sundanese,
+       "Glagolitic":             Glagolitic,
+       "Oriya":                  Oriya,
+       "Buhid":                  Buhid,
+       "Ethiopic":               Ethiopic,
+       "Javanese":               Javanese,
+       "Syloti_Nagri":           Syloti_Nagri,
+       "Vai":                    Vai,
+       "Cherokee":               Cherokee,
+       "Ogham":                  Ogham,
+       "Syriac":                 Syriac,
+       "Gurmukhi":               Gurmukhi,
+       "Tai_Tham":               Tai_Tham,
+       "Ol_Chiki":               Ol_Chiki,
+       "Mongolian":              Mongolian,
+       "Hanunoo":                Hanunoo,
+       "Cypriot":                Cypriot,
+       "Buginese":               Buginese,
+       "Bamum":                  Bamum,
+       "Lepcha":                 Lepcha,
+       "Thaana":                 Thaana,
+       "Old_Persian":            Old_Persian,
+       "Cuneiform":              Cuneiform,
+       "Rejang":                 Rejang,
+       "Georgian":               Georgian,
+       "Shavian":                Shavian,
+       "Lycian":                 Lycian,
+       "Nko":                    Nko,
+       "Yi":                     Yi,
+       "Lao":                    Lao,
+       "Linear_B":               Linear_B,
+       "Old_Italic":             Old_Italic,
+       "Tai_Viet":               Tai_Viet,
+       "Devanagari":             Devanagari,
+       "Lydian":                 Lydian,
+       "Tifinagh":               Tifinagh,
+       "Ugaritic":               Ugaritic,
+       "Thai":                   Thai,
+       "Cyrillic":               Cyrillic,
+       "Gujarati":               Gujarati,
+       "Carian":                 Carian,
+       "Phoenician":             Phoenician,
+       "Balinese":               Balinese,
+       "Braille":                Braille,
+       "Han":                    Han,
+       "Gothic":                 Gothic,
 }
 
 var _Katakana = []Range{
@@ -3090,36 +3090,36 @@ var (
 
 // Properties is the set of Unicode property tables.
 var Properties = map[string][]Range{
-       "Pattern_Syntax": Pattern_Syntax,
-       "Other_ID_Start": Other_ID_Start,
-       "Pattern_White_Space": Pattern_White_Space,
-       "Other_Lowercase": Other_Lowercase,
-       "Soft_Dotted": Soft_Dotted,
-       "Hex_Digit": Hex_Digit,
-       "ASCII_Hex_Digit": ASCII_Hex_Digit,
-       "Deprecated": Deprecated,
-       "Terminal_Punctuation": Terminal_Punctuation,
-       "Quotation_Mark": Quotation_Mark,
-       "Other_ID_Continue": Other_ID_Continue,
-       "Bidi_Control": Bidi_Control,
-       "Variation_Selector": Variation_Selector,
+       "Pattern_Syntax":          Pattern_Syntax,
+       "Other_ID_Start":          Other_ID_Start,
+       "Pattern_White_Space":     Pattern_White_Space,
+       "Other_Lowercase":         Other_Lowercase,
+       "Soft_Dotted":             Soft_Dotted,
+       "Hex_Digit":               Hex_Digit,
+       "ASCII_Hex_Digit":         ASCII_Hex_Digit,
+       "Deprecated":              Deprecated,
+       "Terminal_Punctuation":    Terminal_Punctuation,
+       "Quotation_Mark":          Quotation_Mark,
+       "Other_ID_Continue":       Other_ID_Continue,
+       "Bidi_Control":            Bidi_Control,
+       "Variation_Selector":      Variation_Selector,
        "Noncharacter_Code_Point": Noncharacter_Code_Point,
-       "Other_Math": Other_Math,
-       "Unified_Ideograph": Unified_Ideograph,
-       "Hyphen": Hyphen,
-       "IDS_Binary_Operator": IDS_Binary_Operator,
+       "Other_Math":              Other_Math,
+       "Unified_Ideograph":       Unified_Ideograph,
+       "Hyphen":                  Hyphen,
+       "IDS_Binary_Operator":     IDS_Binary_Operator,
        "Logical_Order_Exception": Logical_Order_Exception,
-       "Radical": Radical,
-       "Other_Uppercase": Other_Uppercase,
-       "STerm": STerm,
-       "Other_Alphabetic": Other_Alphabetic,
-       "Diacritic": Diacritic,
-       "Extender": Extender,
-       "Join_Control": Join_Control,
-       "Ideographic": Ideographic,
-       "Dash": Dash,
-       "IDS_Trinary_Operator": IDS_Trinary_Operator,
-       "Other_Grapheme_Extend": Other_Grapheme_Extend,
+       "Radical":                 Radical,
+       "Other_Uppercase":         Other_Uppercase,
+       "STerm":                   STerm,
+       "Other_Alphabetic":        Other_Alphabetic,
+       "Diacritic":               Diacritic,
+       "Extender":                Extender,
+       "Join_Control":            Join_Control,
+       "Ideographic":             Ideographic,
+       "Dash":                    Dash,
+       "IDS_Trinary_Operator":    IDS_Trinary_Operator,
+       "Other_Grapheme_Extend":   Other_Grapheme_Extend,
        "Other_Default_Ignorable_Code_Point": Other_Default_Ignorable_Code_Point,
        "White_Space": White_Space,
 }
index 4d8b9230331533b5efed8ac147e2542f1f9b204d..3f292ae287b2478b5e6f9510b2579e8db989c4d7 100644 (file)
@@ -216,9 +216,9 @@ func (c *Conn) readNextReply() os.Error {
                err := &Error{
                        Detail: buf[1],
                        Cookie: Cookie(get16(buf[2:])),
-                       Id: Id(get32(buf[4:])),
-                       Minor: get16(buf[8:]),
-                       Major: buf[10],
+                       Id:     Id(get32(buf[4:])),
+                       Minor:  get16(buf[8:]),
+                       Major:  buf[10],
                }
                fmt.Fprintf(os.Stderr, "x protocol error: %s\n", err)
                return err
index 154a6573c4762644c449d1431f51277a8ca7d64d..194bce3337539fca0db3ab2d70aff1d54f4b56fc 100644 (file)
@@ -4133,21 +4133,21 @@ func parseEvent(buf []byte) (Event, os.Error) {
 }
 
 var errorNames = map[byte]string{
-       BadRequest: "Request",
-       BadValue: "Value",
-       BadWindow: "Window",
-       BadPixmap: "Pixmap",
-       BadAtom: "Atom",
-       BadCursor: "Cursor",
-       BadFont: "Font",
-       BadMatch: "Match",
-       BadDrawable: "Drawable",
-       BadAccess: "Access",
-       BadAlloc: "Alloc",
-       BadColormap: "Colormap",
-       BadGContext: "GContext",
-       BadIDChoice: "IDChoice",
-       BadName: "Name",
-       BadLength: "Length",
+       BadRequest:        "Request",
+       BadValue:          "Value",
+       BadWindow:         "Window",
+       BadPixmap:         "Pixmap",
+       BadAtom:           "Atom",
+       BadCursor:         "Cursor",
+       BadFont:           "Font",
+       BadMatch:          "Match",
+       BadDrawable:       "Drawable",
+       BadAccess:         "Access",
+       BadAlloc:          "Alloc",
+       BadColormap:       "Colormap",
+       BadGContext:       "GContext",
+       BadIDChoice:       "IDChoice",
+       BadName:           "Name",
+       BadLength:         "Length",
        BadImplementation: "Implementation",
 }
index 5722387a4f177794d1a21bfb5b2b63f5307a6881..3b8d572ec9f797bc04ea8b73bcfce0d1d47c7de2 100644 (file)
@@ -116,12 +116,12 @@ type Time string
 
 var rssFeed = Feed{
        XMLName: Name{"http://www.w3.org/2005/Atom", "feed"},
-       Title: "Code Review - My issues",
+       Title:   "Code Review - My issues",
        Link: []Link{
                Link{Rel: "alternate", Href: "http://codereview.appspot.com/"},
                Link{Rel: "self", Href: "http://codereview.appspot.com/rss/mine/rsc"},
        },
-       Id: "http://codereview.appspot.com/",
+       Id:      "http://codereview.appspot.com/",
        Updated: "2009-10-04T01:35:58+00:00",
        Author: Person{
                Name: "rietveld",
index 1ddb896dec9ce7247b0aa57edc865767466a492c..ab3a34b1f456633b6d82b140ce76b8f3a04d1b0f 100644 (file)
@@ -156,10 +156,10 @@ type Parser struct {
 // NewParser creates a new XML parser reading from r.
 func NewParser(r io.Reader) *Parser {
        p := &Parser{
-               ns: make(map[string]string),
+               ns:       make(map[string]string),
                nextByte: -1,
-               line: 1,
-               Strict: true,
+               line:     1,
+               Strict:   true,
        }
 
        // Get efficient byte at a time reader.
@@ -698,9 +698,9 @@ func (p *Parser) ungetc(b byte) {
 }
 
 var entity = map[string]int{
-       "lt": '<',
-       "gt": '>',
-       "amp": '&',
+       "lt":   '<',
+       "gt":   '>',
+       "amp":  '&',
        "apos": '\'',
        "quot": '"',
 }
@@ -1229,258 +1229,258 @@ var htmlEntity = map[string]string{
                        ,s/\&lt;!ENTITY ([^ ]+) .*U\+([0-9A-F][0-9A-F][0-9A-F][0-9A-F]) .+/     "\1": "\\u\2",/g
                '
        */
-       "nbsp": "\u00A0",
-       "iexcl": "\u00A1",
-       "cent": "\u00A2",
-       "pound": "\u00A3",
-       "curren": "\u00A4",
-       "yen": "\u00A5",
-       "brvbar": "\u00A6",
-       "sect": "\u00A7",
-       "uml": "\u00A8",
-       "copy": "\u00A9",
-       "ordf": "\u00AA",
-       "laquo": "\u00AB",
-       "not": "\u00AC",
-       "shy": "\u00AD",
-       "reg": "\u00AE",
-       "macr": "\u00AF",
-       "deg": "\u00B0",
-       "plusmn": "\u00B1",
-       "sup2": "\u00B2",
-       "sup3": "\u00B3",
-       "acute": "\u00B4",
-       "micro": "\u00B5",
-       "para": "\u00B6",
-       "middot": "\u00B7",
-       "cedil": "\u00B8",
-       "sup1": "\u00B9",
-       "ordm": "\u00BA",
-       "raquo": "\u00BB",
-       "frac14": "\u00BC",
-       "frac12": "\u00BD",
-       "frac34": "\u00BE",
-       "iquest": "\u00BF",
-       "Agrave": "\u00C0",
-       "Aacute": "\u00C1",
-       "Acirc": "\u00C2",
-       "Atilde": "\u00C3",
-       "Auml": "\u00C4",
-       "Aring": "\u00C5",
-       "AElig": "\u00C6",
-       "Ccedil": "\u00C7",
-       "Egrave": "\u00C8",
-       "Eacute": "\u00C9",
-       "Ecirc": "\u00CA",
-       "Euml": "\u00CB",
-       "Igrave": "\u00CC",
-       "Iacute": "\u00CD",
-       "Icirc": "\u00CE",
-       "Iuml": "\u00CF",
-       "ETH": "\u00D0",
-       "Ntilde": "\u00D1",
-       "Ograve": "\u00D2",
-       "Oacute": "\u00D3",
-       "Ocirc": "\u00D4",
-       "Otilde": "\u00D5",
-       "Ouml": "\u00D6",
-       "times": "\u00D7",
-       "Oslash": "\u00D8",
-       "Ugrave": "\u00D9",
-       "Uacute": "\u00DA",
-       "Ucirc": "\u00DB",
-       "Uuml": "\u00DC",
-       "Yacute": "\u00DD",
-       "THORN": "\u00DE",
-       "szlig": "\u00DF",
-       "agrave": "\u00E0",
-       "aacute": "\u00E1",
-       "acirc": "\u00E2",
-       "atilde": "\u00E3",
-       "auml": "\u00E4",
-       "aring": "\u00E5",
-       "aelig": "\u00E6",
-       "ccedil": "\u00E7",
-       "egrave": "\u00E8",
-       "eacute": "\u00E9",
-       "ecirc": "\u00EA",
-       "euml": "\u00EB",
-       "igrave": "\u00EC",
-       "iacute": "\u00ED",
-       "icirc": "\u00EE",
-       "iuml": "\u00EF",
-       "eth": "\u00F0",
-       "ntilde": "\u00F1",
-       "ograve": "\u00F2",
-       "oacute": "\u00F3",
-       "ocirc": "\u00F4",
-       "otilde": "\u00F5",
-       "ouml": "\u00F6",
-       "divide": "\u00F7",
-       "oslash": "\u00F8",
-       "ugrave": "\u00F9",
-       "uacute": "\u00FA",
-       "ucirc": "\u00FB",
-       "uuml": "\u00FC",
-       "yacute": "\u00FD",
-       "thorn": "\u00FE",
-       "yuml": "\u00FF",
-       "fnof": "\u0192",
-       "Alpha": "\u0391",
-       "Beta": "\u0392",
-       "Gamma": "\u0393",
-       "Delta": "\u0394",
-       "Epsilon": "\u0395",
-       "Zeta": "\u0396",
-       "Eta": "\u0397",
-       "Theta": "\u0398",
-       "Iota": "\u0399",
-       "Kappa": "\u039A",
-       "Lambda": "\u039B",
-       "Mu": "\u039C",
-       "Nu": "\u039D",
-       "Xi": "\u039E",
-       "Omicron": "\u039F",
-       "Pi": "\u03A0",
-       "Rho": "\u03A1",
-       "Sigma": "\u03A3",
-       "Tau": "\u03A4",
-       "Upsilon": "\u03A5",
-       "Phi": "\u03A6",
-       "Chi": "\u03A7",
-       "Psi": "\u03A8",
-       "Omega": "\u03A9",
-       "alpha": "\u03B1",
-       "beta": "\u03B2",
-       "gamma": "\u03B3",
-       "delta": "\u03B4",
-       "epsilon": "\u03B5",
-       "zeta": "\u03B6",
-       "eta": "\u03B7",
-       "theta": "\u03B8",
-       "iota": "\u03B9",
-       "kappa": "\u03BA",
-       "lambda": "\u03BB",
-       "mu": "\u03BC",
-       "nu": "\u03BD",
-       "xi": "\u03BE",
-       "omicron": "\u03BF",
-       "pi": "\u03C0",
-       "rho": "\u03C1",
-       "sigmaf": "\u03C2",
-       "sigma": "\u03C3",
-       "tau": "\u03C4",
-       "upsilon": "\u03C5",
-       "phi": "\u03C6",
-       "chi": "\u03C7",
-       "psi": "\u03C8",
-       "omega": "\u03C9",
+       "nbsp":     "\u00A0",
+       "iexcl":    "\u00A1",
+       "cent":     "\u00A2",
+       "pound":    "\u00A3",
+       "curren":   "\u00A4",
+       "yen":      "\u00A5",
+       "brvbar":   "\u00A6",
+       "sect":     "\u00A7",
+       "uml":      "\u00A8",
+       "copy":     "\u00A9",
+       "ordf":     "\u00AA",
+       "laquo":    "\u00AB",
+       "not":      "\u00AC",
+       "shy":      "\u00AD",
+       "reg":      "\u00AE",
+       "macr":     "\u00AF",
+       "deg":      "\u00B0",
+       "plusmn":   "\u00B1",
+       "sup2":     "\u00B2",
+       "sup3":     "\u00B3",
+       "acute":    "\u00B4",
+       "micro":    "\u00B5",
+       "para":     "\u00B6",
+       "middot":   "\u00B7",
+       "cedil":    "\u00B8",
+       "sup1":     "\u00B9",
+       "ordm":     "\u00BA",
+       "raquo":    "\u00BB",
+       "frac14":   "\u00BC",
+       "frac12":   "\u00BD",
+       "frac34":   "\u00BE",
+       "iquest":   "\u00BF",
+       "Agrave":   "\u00C0",
+       "Aacute":   "\u00C1",
+       "Acirc":    "\u00C2",
+       "Atilde":   "\u00C3",
+       "Auml":     "\u00C4",
+       "Aring":    "\u00C5",
+       "AElig":    "\u00C6",
+       "Ccedil":   "\u00C7",
+       "Egrave":   "\u00C8",
+       "Eacute":   "\u00C9",
+       "Ecirc":    "\u00CA",
+       "Euml":     "\u00CB",
+       "Igrave":   "\u00CC",
+       "Iacute":   "\u00CD",
+       "Icirc":    "\u00CE",
+       "Iuml":     "\u00CF",
+       "ETH":      "\u00D0",
+       "Ntilde":   "\u00D1",
+       "Ograve":   "\u00D2",
+       "Oacute":   "\u00D3",
+       "Ocirc":    "\u00D4",
+       "Otilde":   "\u00D5",
+       "Ouml":     "\u00D6",
+       "times":    "\u00D7",
+       "Oslash":   "\u00D8",
+       "Ugrave":   "\u00D9",
+       "Uacute":   "\u00DA",
+       "Ucirc":    "\u00DB",
+       "Uuml":     "\u00DC",
+       "Yacute":   "\u00DD",
+       "THORN":    "\u00DE",
+       "szlig":    "\u00DF",
+       "agrave":   "\u00E0",
+       "aacute":   "\u00E1",
+       "acirc":    "\u00E2",
+       "atilde":   "\u00E3",
+       "auml":     "\u00E4",
+       "aring":    "\u00E5",
+       "aelig":    "\u00E6",
+       "ccedil":   "\u00E7",
+       "egrave":   "\u00E8",
+       "eacute":   "\u00E9",
+       "ecirc":    "\u00EA",
+       "euml":     "\u00EB",
+       "igrave":   "\u00EC",
+       "iacute":   "\u00ED",
+       "icirc":    "\u00EE",
+       "iuml":     "\u00EF",
+       "eth":      "\u00F0",
+       "ntilde":   "\u00F1",
+       "ograve":   "\u00F2",
+       "oacute":   "\u00F3",
+       "ocirc":    "\u00F4",
+       "otilde":   "\u00F5",
+       "ouml":     "\u00F6",
+       "divide":   "\u00F7",
+       "oslash":   "\u00F8",
+       "ugrave":   "\u00F9",
+       "uacute":   "\u00FA",
+       "ucirc":    "\u00FB",
+       "uuml":     "\u00FC",
+       "yacute":   "\u00FD",
+       "thorn":    "\u00FE",
+       "yuml":     "\u00FF",
+       "fnof":     "\u0192",
+       "Alpha":    "\u0391",
+       "Beta":     "\u0392",
+       "Gamma":    "\u0393",
+       "Delta":    "\u0394",
+       "Epsilon":  "\u0395",
+       "Zeta":     "\u0396",
+       "Eta":      "\u0397",
+       "Theta":    "\u0398",
+       "Iota":     "\u0399",
+       "Kappa":    "\u039A",
+       "Lambda":   "\u039B",
+       "Mu":       "\u039C",
+       "Nu":       "\u039D",
+       "Xi":       "\u039E",
+       "Omicron":  "\u039F",
+       "Pi":       "\u03A0",
+       "Rho":      "\u03A1",
+       "Sigma":    "\u03A3",
+       "Tau":      "\u03A4",
+       "Upsilon":  "\u03A5",
+       "Phi":      "\u03A6",
+       "Chi":      "\u03A7",
+       "Psi":      "\u03A8",
+       "Omega":    "\u03A9",
+       "alpha":    "\u03B1",
+       "beta":     "\u03B2",
+       "gamma":    "\u03B3",
+       "delta":    "\u03B4",
+       "epsilon":  "\u03B5",
+       "zeta":     "\u03B6",
+       "eta":      "\u03B7",
+       "theta":    "\u03B8",
+       "iota":     "\u03B9",
+       "kappa":    "\u03BA",
+       "lambda":   "\u03BB",
+       "mu":       "\u03BC",
+       "nu":       "\u03BD",
+       "xi":       "\u03BE",
+       "omicron":  "\u03BF",
+       "pi":       "\u03C0",
+       "rho":      "\u03C1",
+       "sigmaf":   "\u03C2",
+       "sigma":    "\u03C3",
+       "tau":      "\u03C4",
+       "upsilon":  "\u03C5",
+       "phi":      "\u03C6",
+       "chi":      "\u03C7",
+       "psi":      "\u03C8",
+       "omega":    "\u03C9",
        "thetasym": "\u03D1",
-       "upsih": "\u03D2",
-       "piv": "\u03D6",
-       "bull": "\u2022",
-       "hellip": "\u2026",
-       "prime": "\u2032",
-       "Prime": "\u2033",
-       "oline": "\u203E",
-       "frasl": "\u2044",
-       "weierp": "\u2118",
-       "image": "\u2111",
-       "real": "\u211C",
-       "trade": "\u2122",
-       "alefsym": "\u2135",
-       "larr": "\u2190",
-       "uarr": "\u2191",
-       "rarr": "\u2192",
-       "darr": "\u2193",
-       "harr": "\u2194",
-       "crarr": "\u21B5",
-       "lArr": "\u21D0",
-       "uArr": "\u21D1",
-       "rArr": "\u21D2",
-       "dArr": "\u21D3",
-       "hArr": "\u21D4",
-       "forall": "\u2200",
-       "part": "\u2202",
-       "exist": "\u2203",
-       "empty": "\u2205",
-       "nabla": "\u2207",
-       "isin": "\u2208",
-       "notin": "\u2209",
-       "ni": "\u220B",
-       "prod": "\u220F",
-       "sum": "\u2211",
-       "minus": "\u2212",
-       "lowast": "\u2217",
-       "radic": "\u221A",
-       "prop": "\u221D",
-       "infin": "\u221E",
-       "ang": "\u2220",
-       "and": "\u2227",
-       "or": "\u2228",
-       "cap": "\u2229",
-       "cup": "\u222A",
-       "int": "\u222B",
-       "there4": "\u2234",
-       "sim": "\u223C",
-       "cong": "\u2245",
-       "asymp": "\u2248",
-       "ne": "\u2260",
-       "equiv": "\u2261",
-       "le": "\u2264",
-       "ge": "\u2265",
-       "sub": "\u2282",
-       "sup": "\u2283",
-       "nsub": "\u2284",
-       "sube": "\u2286",
-       "supe": "\u2287",
-       "oplus": "\u2295",
-       "otimes": "\u2297",
-       "perp": "\u22A5",
-       "sdot": "\u22C5",
-       "lceil": "\u2308",
-       "rceil": "\u2309",
-       "lfloor": "\u230A",
-       "rfloor": "\u230B",
-       "lang": "\u2329",
-       "rang": "\u232A",
-       "loz": "\u25CA",
-       "spades": "\u2660",
-       "clubs": "\u2663",
-       "hearts": "\u2665",
-       "diams": "\u2666",
-       "quot": "\u0022",
-       "amp": "\u0026",
-       "lt": "\u003C",
-       "gt": "\u003E",
-       "OElig": "\u0152",
-       "oelig": "\u0153",
-       "Scaron": "\u0160",
-       "scaron": "\u0161",
-       "Yuml": "\u0178",
-       "circ": "\u02C6",
-       "tilde": "\u02DC",
-       "ensp": "\u2002",
-       "emsp": "\u2003",
-       "thinsp": "\u2009",
-       "zwnj": "\u200C",
-       "zwj": "\u200D",
-       "lrm": "\u200E",
-       "rlm": "\u200F",
-       "ndash": "\u2013",
-       "mdash": "\u2014",
-       "lsquo": "\u2018",
-       "rsquo": "\u2019",
-       "sbquo": "\u201A",
-       "ldquo": "\u201C",
-       "rdquo": "\u201D",
-       "bdquo": "\u201E",
-       "dagger": "\u2020",
-       "Dagger": "\u2021",
-       "permil": "\u2030",
-       "lsaquo": "\u2039",
-       "rsaquo": "\u203A",
-       "euro": "\u20AC",
+       "upsih":    "\u03D2",
+       "piv":      "\u03D6",
+       "bull":     "\u2022",
+       "hellip":   "\u2026",
+       "prime":    "\u2032",
+       "Prime":    "\u2033",
+       "oline":    "\u203E",
+       "frasl":    "\u2044",
+       "weierp":   "\u2118",
+       "image":    "\u2111",
+       "real":     "\u211C",
+       "trade":    "\u2122",
+       "alefsym":  "\u2135",
+       "larr":     "\u2190",
+       "uarr":     "\u2191",
+       "rarr":     "\u2192",
+       "darr":     "\u2193",
+       "harr":     "\u2194",
+       "crarr":    "\u21B5",
+       "lArr":     "\u21D0",
+       "uArr":     "\u21D1",
+       "rArr":     "\u21D2",
+       "dArr":     "\u21D3",
+       "hArr":     "\u21D4",
+       "forall":   "\u2200",
+       "part":     "\u2202",
+       "exist":    "\u2203",
+       "empty":    "\u2205",
+       "nabla":    "\u2207",
+       "isin":     "\u2208",
+       "notin":    "\u2209",
+       "ni":       "\u220B",
+       "prod":     "\u220F",
+       "sum":      "\u2211",
+       "minus":    "\u2212",
+       "lowast":   "\u2217",
+       "radic":    "\u221A",
+       "prop":     "\u221D",
+       "infin":    "\u221E",
+       "ang":      "\u2220",
+       "and":      "\u2227",
+       "or":       "\u2228",
+       "cap":      "\u2229",
+       "cup":      "\u222A",
+       "int":      "\u222B",
+       "there4":   "\u2234",
+       "sim":      "\u223C",
+       "cong":     "\u2245",
+       "asymp":    "\u2248",
+       "ne":       "\u2260",
+       "equiv":    "\u2261",
+       "le":       "\u2264",
+       "ge":       "\u2265",
+       "sub":      "\u2282",
+       "sup":      "\u2283",
+       "nsub":     "\u2284",
+       "sube":     "\u2286",
+       "supe":     "\u2287",
+       "oplus":    "\u2295",
+       "otimes":   "\u2297",
+       "perp":     "\u22A5",
+       "sdot":     "\u22C5",
+       "lceil":    "\u2308",
+       "rceil":    "\u2309",
+       "lfloor":   "\u230A",
+       "rfloor":   "\u230B",
+       "lang":     "\u2329",
+       "rang":     "\u232A",
+       "loz":      "\u25CA",
+       "spades":   "\u2660",
+       "clubs":    "\u2663",
+       "hearts":   "\u2665",
+       "diams":    "\u2666",
+       "quot":     "\u0022",
+       "amp":      "\u0026",
+       "lt":       "\u003C",
+       "gt":       "\u003E",
+       "OElig":    "\u0152",
+       "oelig":    "\u0153",
+       "Scaron":   "\u0160",
+       "scaron":   "\u0161",
+       "Yuml":     "\u0178",
+       "circ":     "\u02C6",
+       "tilde":    "\u02DC",
+       "ensp":     "\u2002",
+       "emsp":     "\u2003",
+       "thinsp":   "\u2009",
+       "zwnj":     "\u200C",
+       "zwj":      "\u200D",
+       "lrm":      "\u200E",
+       "rlm":      "\u200F",
+       "ndash":    "\u2013",
+       "mdash":    "\u2014",
+       "lsquo":    "\u2018",
+       "rsquo":    "\u2019",
+       "sbquo":    "\u201A",
+       "ldquo":    "\u201C",
+       "rdquo":    "\u201D",
+       "bdquo":    "\u201E",
+       "dagger":   "\u2020",
+       "Dagger":   "\u2021",
+       "permil":   "\u2030",
+       "lsaquo":   "\u2039",
+       "rsaquo":   "\u203A",
+       "euro":     "\u20AC",
 }
 
 // HTMLAutoClose is the set of HTML elements that
index 2bd084fd82d03455c2fb3080f1efeab2e97d2193..3749a3a53884a18ce1d0345cf4023839abb22871 100644 (file)
@@ -238,25 +238,25 @@ type allScalars struct {
 }
 
 var all = allScalars{
-       True1: true,
-       True2: true,
-       False1: false,
-       False2: false,
-       Int: 1,
-       Int8: -2,
-       Int16: 3,
-       Int32: -4,
-       Int64: 5,
-       Uint: 6,
-       Uint8: 7,
-       Uint16: 8,
-       Uint32: 9,
-       Uint64: 10,
+       True1:   true,
+       True2:   true,
+       False1:  false,
+       False2:  false,
+       Int:     1,
+       Int8:    -2,
+       Int16:   3,
+       Int32:   -4,
+       Int64:   5,
+       Uint:    6,
+       Uint8:   7,
+       Uint16:  8,
+       Uint32:  9,
+       Uint64:  10,
        Uintptr: 11,
-       Float: 12.0,
+       Float:   12.0,
        Float32: 13.0,
        Float64: 14.0,
-       String: "15",
+       String:  "15",
 }
 
 const testScalarsInput = `<allscalars>