Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
5827dd05
Commit
5827dd05
authored
Mar 07, 2012
by
Robert Griesemer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
go/scanner: better panic diagnostic
R=golang-dev, bradfitz CC=golang-dev
https://golang.org/cl/5787045
parent
a2f03971
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/pkg/go/scanner/scanner.go
src/pkg/go/scanner/scanner.go
+1
-1
No files found.
src/pkg/go/scanner/scanner.go
View file @
5827dd05
...
...
@@ -109,7 +109,7 @@ const (
func
(
s
*
Scanner
)
Init
(
file
*
token
.
File
,
src
[]
byte
,
err
ErrorHandler
,
mode
Mode
)
{
// Explicitly initialize all fields since a scanner may be reused.
if
file
.
Size
()
!=
len
(
src
)
{
panic
(
"file size does not match src len"
)
panic
(
fmt
.
Sprintf
(
"file size (%d) does not match src len (%d)"
,
file
.
Size
(),
len
(
src
))
)
}
s
.
file
=
file
s
.
dir
,
_
=
filepath
.
Split
(
file
.
Name
())
...
...
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