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
0d6a5e86
Commit
0d6a5e86
authored
Jul 19, 2022
by
Jake Taylor
Browse files
Options
Downloads
Patches
Plain Diff
clean up of cmd
parent
04806494
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!510
Release
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
cmd/ud.go
+1
-18
1 addition, 18 deletions
cmd/ud.go
cmd/utils.go
+11
-0
11 additions, 0 deletions
cmd/utils.go
with
12 additions
and
18 deletions
cmd/ud.go
+
1
−
18
View file @
0d6a5e86
...
@@ -295,26 +295,9 @@ func init() {
...
@@ -295,26 +295,9 @@ func init() {
"Search for users with this email address."
)
"Search for users with this email address."
)
bindFlagHelper
(
udSearchPhoneFlag
,
udCmd
)
bindFlagHelper
(
udSearchPhoneFlag
,
udCmd
)
udCmd
.
Flags
()
.
String
(
"
udBatch
"
,
""
,
udCmd
.
Flags
()
.
String
(
udBatch
AddFlag
,
""
,
"Path to JSON marshalled slice of partner IDs that will be looked up on UD."
)
"Path to JSON marshalled slice of partner IDs that will be looked up on UD."
)
err
:=
viper
.
BindPFlag
(
"udBatch"
,
udCmd
.
Flags
()
.
Lookup
(
"udBatch"
))
if
err
!=
nil
{
jww
.
ERROR
.
Printf
(
"viper.BindPFlag failed for %q: %+v"
,
"udBatch"
,
err
)
}
bindFlagHelper
(
udBatchAddFlag
,
udCmd
)
bindFlagHelper
(
udBatchAddFlag
,
udCmd
)
rootCmd
.
AddCommand
(
udCmd
)
rootCmd
.
AddCommand
(
udCmd
)
}
}
func
printContact
(
c
contact
.
Contact
)
{
jww
.
DEBUG
.
Printf
(
"Printing contact: %+v"
,
c
)
cBytes
:=
c
.
Marshal
()
if
len
(
cBytes
)
==
0
{
jww
.
ERROR
.
Print
(
"Marshaled contact has a size of 0."
)
}
else
{
jww
.
DEBUG
.
Printf
(
"Printing marshaled contact of size %d."
,
len
(
cBytes
))
}
fmt
.
Print
(
string
(
cBytes
))
}
This diff is collapsed.
Click to expand it.
cmd/utils.go
+
11
−
0
View file @
0d6a5e86
...
@@ -117,7 +117,18 @@ func printRoundResults(rounds map[id.Round]cmix.RoundResult, roundIDs []id.Round
...
@@ -117,7 +117,18 @@ func printRoundResults(rounds map[id.Round]cmix.RoundResult, roundIDs []id.Round
jww
.
ERROR
.
Printf
(
"
\t
Round(s) %v timed out (no network resolution could be found)"
,
jww
.
ERROR
.
Printf
(
"
\t
Round(s) %v timed out (no network resolution could be found)"
,
strings
.
Join
(
timedOutRounds
,
","
))
strings
.
Join
(
timedOutRounds
,
","
))
}
}
}
func
printContact
(
c
contact
.
Contact
)
{
jww
.
DEBUG
.
Printf
(
"Printing contact: %+v"
,
c
)
cBytes
:=
c
.
Marshal
()
if
len
(
cBytes
)
==
0
{
jww
.
ERROR
.
Print
(
"Marshaled contact has a size of 0."
)
}
else
{
jww
.
DEBUG
.
Printf
(
"Printing marshaled contact of size %d."
,
len
(
cBytes
))
}
jww
.
INFO
.
Printf
(
string
(
cBytes
))
}
}
func
writeContact
(
c
contact
.
Contact
)
{
func
writeContact
(
c
contact
.
Contact
)
{
...
...
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