Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
client
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elixxir
client
Commits
6e70f6dd
Commit
6e70f6dd
authored
Sep 3, 2021
by
Richard T. Carback III
Browse files
Options
Downloads
Patches
Plain Diff
Newlines
parent
22d33f74
Branches
Branches containing commit
Tags
Tags containing commit
2 merge requests
!23
Release
,
!18
Add remove user and add flag on command line for testing
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
cmd/ud.go
+5
-5
5 additions, 5 deletions
cmd/ud.go
with
5 additions
and
5 deletions
cmd/ud.go
+
5
−
5
View file @
6e70f6dd
...
@@ -89,7 +89,7 @@ var udCmd = &cobra.Command{
...
@@ -89,7 +89,7 @@ var udCmd = &cobra.Command{
if
userToRegister
!=
""
{
if
userToRegister
!=
""
{
err
=
userDiscoveryMgr
.
Register
(
userToRegister
)
err
=
userDiscoveryMgr
.
Register
(
userToRegister
)
if
err
!=
nil
{
if
err
!=
nil
{
fmt
.
Printf
(
"Failed to register user %s: %s"
,
fmt
.
Printf
(
"Failed to register user %s: %s
\n
"
,
userToRegister
,
err
.
Error
())
userToRegister
,
err
.
Error
())
jww
.
FATAL
.
Panicf
(
"Failed to register user %s: %+v"
,
userToRegister
,
err
)
jww
.
FATAL
.
Panicf
(
"Failed to register user %s: %+v"
,
userToRegister
,
err
)
}
}
...
@@ -117,7 +117,7 @@ var udCmd = &cobra.Command{
...
@@ -117,7 +117,7 @@ var udCmd = &cobra.Command{
for
i
:=
0
;
i
<
len
(
newFacts
);
i
++
{
for
i
:=
0
;
i
<
len
(
newFacts
);
i
++
{
r
,
err
:=
userDiscoveryMgr
.
SendRegisterFact
(
newFacts
[
i
])
r
,
err
:=
userDiscoveryMgr
.
SendRegisterFact
(
newFacts
[
i
])
if
err
!=
nil
{
if
err
!=
nil
{
fmt
.
Printf
(
"Failed to register fact: %s"
,
fmt
.
Printf
(
"Failed to register fact: %s
\n
"
,
newFacts
[
i
])
newFacts
[
i
])
jww
.
FATAL
.
Panicf
(
"Failed to send register fact: %+v"
,
err
)
jww
.
FATAL
.
Panicf
(
"Failed to send register fact: %+v"
,
err
)
}
}
...
@@ -130,7 +130,7 @@ var udCmd = &cobra.Command{
...
@@ -130,7 +130,7 @@ var udCmd = &cobra.Command{
// TODO: Lookup code
// TODO: Lookup code
err
=
userDiscoveryMgr
.
SendConfirmFact
(
confirmID
,
confirmID
)
err
=
userDiscoveryMgr
.
SendConfirmFact
(
confirmID
,
confirmID
)
if
err
!=
nil
{
if
err
!=
nil
{
fmt
.
Print
(
"Couldn't confirm fact: %s"
,
fmt
.
Print
(
"Couldn't confirm fact: %s
\n
"
,
err
.
Error
())
err
.
Error
())
jww
.
FATAL
.
Panicf
(
"%+v"
,
err
)
jww
.
FATAL
.
Panicf
(
"%+v"
,
err
)
}
}
...
@@ -193,13 +193,13 @@ var udCmd = &cobra.Command{
...
@@ -193,13 +193,13 @@ var udCmd = &cobra.Command{
}
}
err
=
userDiscoveryMgr
.
RemoveUser
(
f
)
err
=
userDiscoveryMgr
.
RemoveUser
(
f
)
if
err
!=
nil
{
if
err
!=
nil
{
fmt
.
Printf
(
"Couldn't remove user %s"
,
fmt
.
Printf
(
"Couldn't remove user %s
\n
"
,
userToRemove
)
userToRemove
)
jww
.
FATAL
.
Panicf
(
jww
.
FATAL
.
Panicf
(
"Failed to remove user %s: %+v"
,
"Failed to remove user %s: %+v"
,
userToRemove
,
err
)
userToRemove
,
err
)
}
}
fmt
.
Printf
(
"Removed user from discovery: %s"
,
fmt
.
Printf
(
"Removed user from discovery: %s
\n
"
,
userToRemove
)
userToRemove
)
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment