Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Kirill Smelkov
neo
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
Hide 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) {
return
&
IndexSaveError
{
err
}
}
// TODO use buffering for f (ogórek does not buffer itself on encoding)
defer
func
()
{
err2
:=
f
.
Close
()
if
err2
!=
nil
&&
err
==
nil
{
...
...
@@ -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
)
}
// TODO move vvv to common place
// TODO move vvv to common place
-> xio
// CountReader is an io.Reader that count total bytes read
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