Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
8fbd5f8a
Commit
8fbd5f8a
authored
Feb 26, 2010
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use []byte("abc") in place of []byte{'a', 'b', 'c'}
R=gri CC=golang-dev
https://golang.org/cl/223059
parent
d1775398
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
12 deletions
+12
-12
asn1_test.go
src/pkg/asn1/asn1_test.go
+1
-1
print.go
src/pkg/fmt/print.go
+9
-9
filter.go
src/pkg/go/ast/filter.go
+1
-1
scanner.go
src/pkg/go/scanner/scanner.go
+1
-1
No files found.
src/pkg/asn1/asn1_test.go
View file @
8fbd5f8a
...
...
@@ -276,7 +276,7 @@ var unmarshalTestData []unmarshalTest = []unmarshalTest{
unmarshalTest
{[]
byte
{
0x02
,
0x01
,
0x10
},
newInt
(
16
)},
unmarshalTest
{[]
byte
{
0x13
,
0x04
,
't'
,
'e'
,
's'
,
't'
},
newString
(
"test"
)},
unmarshalTest
{[]
byte
{
0x16
,
0x04
,
't'
,
'e'
,
's'
,
't'
},
newString
(
"test"
)},
unmarshalTest
{[]
byte
{
0x16
,
0x04
,
't'
,
'e'
,
's'
,
't'
},
&
RawValue
{
0
,
22
,
false
,
[]
byte
{
't'
,
'e'
,
's'
,
't'
}
}},
unmarshalTest
{[]
byte
{
0x16
,
0x04
,
't'
,
'e'
,
's'
,
't'
},
&
RawValue
{
0
,
22
,
false
,
[]
byte
(
"test"
)
}},
unmarshalTest
{[]
byte
{
0x04
,
0x04
,
1
,
2
,
3
,
4
},
&
RawValue
{
0
,
4
,
false
,
[]
byte
{
1
,
2
,
3
,
4
}}},
unmarshalTest
{[]
byte
{
0x30
,
0x03
,
0x81
,
0x01
,
0x01
},
&
TestContextSpecificTags
{
1
}},
unmarshalTest
{[]
byte
{
0x30
,
0x08
,
0xa1
,
0x03
,
0x02
,
0x01
,
0x01
,
0x02
,
0x01
,
0x02
},
&
TestContextSpecificTags2
{
1
,
2
}},
...
...
src/pkg/fmt/print.go
View file @
8fbd5f8a
...
...
@@ -87,15 +87,15 @@ import (
// Some constants in the form of bytes, to avoid string overhead.
// Needlessly fastidious, I suppose.
var
(
trueBytes
=
[]
byte
{
't'
,
'r'
,
'u'
,
'e'
}
falseBytes
=
[]
byte
{
'f'
,
'a'
,
'l'
,
's'
,
'e'
}
commaSpaceBytes
=
[]
byte
{
','
,
' '
}
nilAngleBytes
=
[]
byte
{
'<'
,
'n'
,
'i'
,
'l'
,
'>'
}
nilParenBytes
=
[]
byte
{
'('
,
'n'
,
'i'
,
'l'
,
')'
}
nilBytes
=
[]
byte
{
'n'
,
'i'
,
'l'
}
mapBytes
=
[]
byte
{
'm'
,
'a'
,
'p'
,
'['
}
missingBytes
=
[]
byte
{
'm'
,
'i'
,
's'
,
's'
,
'i'
,
'n'
,
'g'
}
extraBytes
=
[]
byte
{
'?'
,
'('
,
'e'
,
'x'
,
't'
,
'r'
,
'a'
,
' '
}
trueBytes
=
[]
byte
(
"true"
)
falseBytes
=
[]
byte
(
"false"
)
commaSpaceBytes
=
[]
byte
(
", "
)
nilAngleBytes
=
[]
byte
(
"<nil>"
)
nilParenBytes
=
[]
byte
(
"(nil)"
)
nilBytes
=
[]
byte
(
"nil"
)
mapBytes
=
[]
byte
(
"map["
)
missingBytes
=
[]
byte
(
"missing"
)
extraBytes
=
[]
byte
(
"?(extra "
)
)
// State represents the printer state passed to custom formatters.
...
...
src/pkg/go/ast/filter.go
View file @
8fbd5f8a
...
...
@@ -192,7 +192,7 @@ func PackageExports(pkg *Package) bool {
// separator is an empty //-style comment that is interspersed between
// different comment groups when they are concatenated into a single group
//
var
separator
=
&
Comment
{
noPos
,
[]
byte
{
'/'
,
'/'
}
}
var
separator
=
&
Comment
{
noPos
,
[]
byte
(
"//"
)
}
// MergePackageFiles creates a file AST by merging the ASTs of the
...
...
src/pkg/go/scanner/scanner.go
View file @
8fbd5f8a
...
...
@@ -145,7 +145,7 @@ func (S *Scanner) expect(ch int) {
}
var
prefix
=
[]
byte
{
'l'
,
'i'
,
'n'
,
'e'
,
' '
}
// "line "
var
prefix
=
[]
byte
(
"line "
)
func
(
S
*
Scanner
)
scanComment
(
pos
token
.
Position
)
{
// first '/' already consumed
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment