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
45129ef4
Commit
45129ef4
authored
Mar 28, 2017
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
24fd4ed9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
5 deletions
+1
-5
t/neo/zodb/cmd/zodbdump/zodbdump.go
t/neo/zodb/cmd/zodbdump/zodbdump.go
+0
-5
t/neo/zodb/str.go
t/neo/zodb/str.go
+1
-0
No files found.
t/neo/zodb/cmd/zodbdump/zodbdump.go
View file @
45129ef4
...
...
@@ -63,29 +63,24 @@ func (d *dumper) DumpData(datai *zodb.StorageRecordInformation) error {
xbuf
:=
&
d
.
xbuf
xbuf
.
Reset
()
//entry := "obj " + datai.Oid.String() + " "
xbuf
.
S
(
"obj "
)
.
V
(
&
datai
.
Oid
)
.
Cb
(
' '
)
writeData
:=
false
switch
{
case
datai
.
Data
==
nil
:
//entry += "delete"
xbuf
.
S
(
"delete"
)
case
datai
.
Tid
!=
datai
.
DataTid
:
//entry += "from " + datai.DataTid.String()
xbuf
.
S
(
"from "
)
.
V
(
&
datai
.
DataTid
)
default
:
//entry += fmt.Sprintf("%d sha1:%x", len(datai.Data), sha1.Sum(datai.Data))
dataSha1
:=
sha1
.
Sum
(
datai
.
Data
)
xbuf
.
D
(
len
(
datai
.
Data
))
.
S
(
" sha1:"
)
.
Xb
(
dataSha1
[
:
])
writeData
=
true
}
//entry += "\n"
xbuf
.
Cb
(
'\n'
)
// TODO use writev(data, "\n") via net.Buffers (it is already available)
...
...
t/neo/zodb/str.go
View file @
45129ef4
...
...
@@ -55,6 +55,7 @@ func (xid Xid) String() string {
// parseHex64 decode 16-character-wide hex-encoded string into uint64
// XXX -> xfmt ?
func
parseHex64
(
subj
,
s
string
)
(
uint64
,
error
)
{
// XXX like scanf("%016x") but scanf implicitly skips spaces without giving control to caller and is slower
var
b
[
8
]
byte
...
...
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