Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neoppod
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Levin Zimmermann
neoppod
Commits
ebf8fd11
Commit
ebf8fd11
authored
Apr 19, 2017
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
X fs1: TODO buffering for index save
parent
d9cfa3c0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
t/neo/storage/fs1/index.go
t/neo/storage/fs1/index.go
+4
-1
No files found.
t/neo/storage/fs1/index.go
View file @
ebf8fd11
...
@@ -161,6 +161,8 @@ func (fsi *fsIndex) SaveFile(topPos int64, path string) (err error) {
...
@@ -161,6 +161,8 @@ func (fsi *fsIndex) SaveFile(topPos int64, path string) (err error) {
return
&
IndexSaveError
{
err
}
return
&
IndexSaveError
{
err
}
}
}
// TODO use buffering for f (ogórek does not buffer itself on encoding)
defer
func
()
{
defer
func
()
{
err2
:=
f
.
Close
()
err2
:=
f
.
Close
()
if
err2
!=
nil
&&
err
==
nil
{
if
err2
!=
nil
&&
err
==
nil
{
...
@@ -330,11 +332,12 @@ func LoadIndexFile(path string) (topPos int64, fsi *fsIndex, err error) {
...
@@ -330,11 +332,12 @@ func LoadIndexFile(path string) (topPos int64, fsi *fsIndex, err error) {
}
}
}()
}()
// NOTE no explicit bufferring needed - ogórek and LoadIndex use bufio.Reader internally
return
LoadIndex
(
f
)
return
LoadIndex
(
f
)
}
}
// TODO move vvv to common place
// TODO move vvv to common place
-> xio
// CountReader is an io.Reader that count total bytes read
// CountReader is an io.Reader that count total bytes read
type
CountReader
struct
{
type
CountReader
struct
{
...
...
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