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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elixxir
client
Commits
bf37e8aa
Commit
bf37e8aa
authored
2 years ago
by
Josh Brooks
Browse files
Options
Downloads
Patches
Plain Diff
Resolve comments
parent
5fa924ee
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!510
Release
,
!343
Hotfix/set legacy flag
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
cmd/flags.go
+1
-1
1 addition, 1 deletion
cmd/flags.go
cmd/init.go
+13
-10
13 additions, 10 deletions
cmd/init.go
with
14 additions
and
11 deletions
cmd/flags.go
+
1
−
1
View file @
bf37e8aa
...
...
@@ -82,7 +82,7 @@ const (
profileCpuFlag
=
"profile-cpu"
profileMemFlag
=
"profile-mem"
userIdPrefixFlag
=
"userid-prefix"
setL
egacyFlag
=
"setL
egacy"
l
egacyFlag
=
"l
egacy"
///////////////// Broadcast subcommand flags //////////////////////////////
broadcastNameFlag
=
"name"
...
...
This diff is collapsed.
Click to expand it.
cmd/init.go
+
13
−
10
View file @
bf37e8aa
...
...
@@ -45,24 +45,27 @@ var initCmd = &cobra.Command{
jww
.
FATAL
.
Panicf
(
"%+v"
,
err
)
}
// Generate identity
var
identity
xxdk
.
ReceptionIdentity
if
viper
.
GetBool
(
setL
egacyFlag
)
{
if
viper
.
GetBool
(
l
egacyFlag
)
{
identity
,
err
=
xxdk
.
MakeLegacyReceptionIdentity
(
net
)
if
err
!=
nil
{
jww
.
FATAL
.
Panicf
(
"%+v"
,
err
)
}
}
else
{
identity
,
err
=
xxdk
.
MakeReceptionIdentity
(
net
)
if
err
!=
nil
{
jww
.
FATAL
.
Panicf
(
"%+v"
,
err
)
}
}
// Panic if conditional branch fails
if
err
!=
nil
{
jww
.
FATAL
.
Panicf
(
"%+v"
,
err
)
}
// Store identity
err
=
xxdk
.
StoreReceptionIdentity
(
identityStorageKey
,
identity
,
net
)
if
err
!=
nil
{
jww
.
FATAL
.
Panicf
(
"%+v"
,
err
)
}
// Write contact to file
jww
.
INFO
.
Printf
(
"User: %s"
,
identity
.
ID
)
writeContact
(
identity
.
GetContact
())
...
...
@@ -76,9 +79,9 @@ func init() {
"Desired prefix of userID to brute force when running init command. Prepend (?i) for case-insensitive. Only Base64 characters are valid."
)
bindFlagHelper
(
userIdPrefixFlag
,
initCmd
)
initCmd
.
Flags
()
.
BoolP
(
setL
egacyFlag
,
""
,
false
,
"Generates a legacy
contact file
if set. Otherwise generates a standard contact file."
)
bindFlagHelper
(
setL
egacyFlag
,
initCmd
)
initCmd
.
Flags
()
.
BoolP
(
l
egacyFlag
,
""
,
false
,
"Generates a legacy
identity
if set. Otherwise generates a standard contact file."
)
bindFlagHelper
(
l
egacyFlag
,
initCmd
)
rootCmd
.
AddCommand
(
initCmd
)
}
...
...
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