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
3d909114
Commit
3d909114
authored
Apr 05, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
go/zodb: Provide String for events
This helps when events are printed and logged.
parent
53a54d61
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
go/zodb/str.go
go/zodb/str.go
+10
-1
No files found.
go/zodb/str.go
View file @
3d909114
// Copyright (C) 2017-20
19
Nexedi SA and Contributors.
// Copyright (C) 2017-20
20
Nexedi SA and Contributors.
// Kirill Smelkov <kirr@nexedi.com>
// Kirill Smelkov <kirr@nexedi.com>
//
//
// This program is free software: you can Use, Study, Modify and Redistribute
// This program is free software: you can Use, Study, Modify and Redistribute
...
@@ -82,6 +82,15 @@ func (xid Xid) XFmtString(b xfmt.Buffer) xfmt.Buffer {
...
@@ -82,6 +82,15 @@ func (xid Xid) XFmtString(b xfmt.Buffer) xfmt.Buffer {
}
}
*/
*/
// String formats events into human-readable form.
func
(
e
*
EventError
)
String
()
string
{
return
"error: "
+
e
.
Err
.
Error
()
}
func
(
e
*
EventCommit
)
String
()
string
{
return
fmt
.
Sprintf
(
"commit @%s δ: %s"
,
e
.
Tid
,
e
.
Changev
)
}
// parseHex64 decodes 16-character-wide hex-encoded string into uint64.
// parseHex64 decodes 16-character-wide hex-encoded string into uint64.
func
parseHex64
(
subj
,
s
string
)
(
uint64
,
error
)
{
func
parseHex64
(
subj
,
s
string
)
(
uint64
,
error
)
{
...
...
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