mirror of
https://github.com/golang/go
synced 2024-11-21 14:04:41 -07:00
gofmt: experiment: align values in map composites where possible
- gofmt -w src misc - looking for feedback R=rsc, r CC=golang-dev https://golang.org/cl/223076
This commit is contained in:
parent
36ea8bb7bf
commit
f44fa9b4c7
@ -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
|
||||
|
@ -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)),
|
||||
}
|
||||
}
|
||||
|
@ -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",
|
||||
}
|
||||
|
||||
|
@ -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 clause",
|
||||
ImportDecl: "import decl",
|
||||
ConstDecl: "const decl",
|
||||
TypeDecl: "type decl",
|
||||
VarDecl: "var decl",
|
||||
FuncDecl: "func decl",
|
||||
MethodDecl: "method decl",
|
||||
Use: "use",
|
||||
ImportDecl: "import decl",
|
||||
ConstDecl: "const decl",
|
||||
TypeDecl: "type decl",
|
||||
VarDecl: "var decl",
|
||||
FuncDecl: "func decl",
|
||||
MethodDecl: "method 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
|
||||
}
|
||||
|
||||
|
||||
|
@ -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})
|
||||
|
@ -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',
|
||||
},
|
||||
},
|
||||
|
@ -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
|
||||
},
|
||||
|
@ -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,
|
||||
})
|
||||
}
|
||||
|
@ -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" +
|
||||
|
@ -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),
|
||||
}
|
||||
}
|
||||
|
@ -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 {
|
||||
|
@ -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())
|
||||
|
@ -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,
|
||||
}
|
||||
|
@ -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)
|
||||
|
@ -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 {
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
|
@ -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}",
|
||||
|
@ -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))
|
||||
|
@ -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),
|
||||
}
|
||||
|
||||
|
@ -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 {
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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,
|
||||
}
|
||||
|
||||
|
@ -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},
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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 {
|
||||
|
@ -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)
|
||||
|
@ -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 {
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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 {
|
||||
|
@ -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 {
|
||||
|
70
src/pkg/go/printer/testdata/declarations.golden
vendored
70
src/pkg/go/printer/testdata/declarations.golden
vendored
@ -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,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
12
src/pkg/go/printer/testdata/declarations.input
vendored
12
src/pkg/go/printer/testdata/declarations.input
vendored
@ -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 {
|
||||
|
186
src/pkg/go/printer/testdata/linebreaks.golden
vendored
186
src/pkg/go/printer/testdata/linebreaks.golden
vendored
@ -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",
|
||||
|
@ -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",
|
||||
}
|
||||
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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,
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
@ -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"},
|
||||
},
|
||||
|
@ -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",
|
||||
|
@ -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.
|
||||
|
@ -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 {
|
||||
|
@ -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" +
|
||||
|
@ -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.
|
||||
|
@ -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"},
|
||||
},
|
||||
|
||||
|
@ -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" +
|
||||
|
@ -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",
|
||||
}
|
||||
|
@ -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",
|
||||
}
|
||||
|
||||
|
@ -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) {
|
||||
|
@ -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:].
|
||||
|
@ -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 {
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
}
|
||||
|
@ -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",
|
||||
}
|
||||
|
||||
|
||||
|
@ -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",
|
||||
}
|
||||
|
@ -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",
|
||||
}
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
}
|
||||
|
@ -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",
|
||||
}
|
||||
|
@ -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",
|
||||
}
|
||||
|
@ -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",
|
||||
}
|
||||
|
@ -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.
|
||||
|
@ -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{
|
||||
|
@ -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,
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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",
|
||||
}
|
||||
|
@ -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",
|
||||
|
@ -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/\<!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
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user