Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
IRMA
Github mirrors
irmago
Commits
b2f42cdc
Commit
b2f42cdc
authored
Sep 30, 2017
by
Sietse Ringers
Browse files
Also store info on failed updates
parent
dde1fabc
Changes
2
Hide whitespace changes
Inline
Side-by-side
storage.go
View file @
b2f42cdc
...
...
@@ -166,15 +166,17 @@ func (cm *CredentialManager) update() error {
// Perform all new updates
for
i
:=
len
(
cm
.
updates
);
i
<
len
(
credentialManagerUpdates
);
i
++
{
if
err
:=
credentialManagerUpdates
[
i
](
cm
);
err
!=
nil
{
return
err
err
=
credentialManagerUpdates
[
i
](
cm
)
update
:=
update
{
When
:
Timestamp
(
time
.
Now
()),
Number
:
i
,
Success
:
err
==
nil
,
}
if
err
!=
nil
{
str
:=
err
.
Error
()
update
.
Error
=
&
str
}
cm
.
updates
=
append
(
cm
.
updates
,
update
{
When
:
Timestamp
(
time
.
Now
()),
Number
:
i
,
},
)
cm
.
updates
=
append
(
cm
.
updates
,
update
)
}
// Save updates file
...
...
updates.go
View file @
b2f42cdc
...
...
@@ -12,8 +12,10 @@ import (
)
type
update
struct
{
When
Timestamp
Number
int
When
Timestamp
Number
int
Success
bool
Error
*
string
}
var
credentialManagerUpdates
=
[]
func
(
manager
*
CredentialManager
)
error
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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