Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-dms3
Commits
2f345c85
Commit
2f345c85
authored
Oct 22, 2014
by
Juan Batiz-Benet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup: removed key marshal logs
parent
4b01ad0b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
4 deletions
+1
-4
util/key.go
util/key.go
+1
-4
No files found.
util/key.go
View file @
2f345c85
...
...
@@ -55,15 +55,12 @@ func (k *Key) UnmarshalJSON(mk []byte) error {
if
len
(
*
k
)
==
0
&&
len
(
s
)
>
2
{
// if b58.Decode fails, k == ""
return
fmt
.
Errorf
(
"Key.UnmarshalJSON: invalid b58 string: %v"
,
mk
)
}
log
.
Info
(
"Unmarshal in: %s
\"
%s
\"
"
,
*
k
,
s
)
return
nil
}
// MarshalJSON returns a JSON-encoded Key (string)
func
(
k
*
Key
)
MarshalJSON
()
([]
byte
,
error
)
{
b
,
err
:=
json
.
Marshal
(
b58
.
Encode
([]
byte
(
*
k
)))
log
.
Info
(
"Marshal out: %s %s"
,
*
k
,
b
)
return
b
,
err
return
json
.
Marshal
(
b58
.
Encode
([]
byte
(
*
k
)))
}
// KeyFromDsKey returns a Datastore key
...
...
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