Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
og-rek
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
og-rek
Commits
2680dba0
Commit
2680dba0
authored
Jun 23, 2015
by
Kamil Kisiel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tidy up readLine
parent
1af399ba
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
12 deletions
+18
-12
ogórek.go
ogórek.go
+9
-6
ogórek.go
ogórek.go
+9
-6
No files found.
ogórek.go
View file @
2680dba0
...
...
@@ -239,15 +239,18 @@ func (d Decoder) Decode() (interface{}, error) {
}
func
(
d
*
Decoder
)
readLine
()
([]
byte
,
error
)
{
var
has_more
bool
=
true
var
line
[]
byte
=
[]
byte
{}
for
has_more
{
read_data
,
is_prefix
,
err
:=
d
.
r
.
ReadLine
()
var
(
line
[]
byte
data
[]
byte
isPrefix
=
true
err
error
)
for
isPrefix
{
data
,
isPrefix
,
err
=
d
.
r
.
ReadLine
()
if
err
!=
nil
{
return
line
,
err
}
has_more
=
is_prefix
line
=
append
(
line
,
read_data
...
)
line
=
append
(
line
,
data
...
)
}
return
line
,
nil
}
...
...
ogórek.go
View file @
2680dba0
...
...
@@ -239,15 +239,18 @@ func (d Decoder) Decode() (interface{}, error) {
}
func
(
d
*
Decoder
)
readLine
()
([]
byte
,
error
)
{
var
has_more
bool
=
true
var
line
[]
byte
=
[]
byte
{}
for
has_more
{
read_data
,
is_prefix
,
err
:=
d
.
r
.
ReadLine
()
var
(
line
[]
byte
data
[]
byte
isPrefix
=
true
err
error
)
for
isPrefix
{
data
,
isPrefix
,
err
=
d
.
r
.
ReadLine
()
if
err
!=
nil
{
return
line
,
err
}
has_more
=
is_prefix
line
=
append
(
line
,
read_data
...
)
line
=
append
(
line
,
data
...
)
}
return
line
,
nil
}
...
...
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