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
9e2fe243
Commit
9e2fe243
authored
2 years ago
by
Josh Brooks
Browse files
Options
Downloads
Plain Diff
Merge branch 'hotfix/SetLegacyFlag' into 'release'
Hotfix/set legacy flag See merge request
!343
parents
e7736fde
ce75d9cd
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
-0
1 addition, 0 deletions
cmd/flags.go
cmd/init.go
+17
-1
17 additions, 1 deletion
cmd/init.go
with
18 additions
and
1 deletion
cmd/flags.go
+
1
−
0
View file @
9e2fe243
...
...
@@ -82,6 +82,7 @@ const (
profileCpuFlag
=
"profile-cpu"
profileMemFlag
=
"profile-mem"
userIdPrefixFlag
=
"userid-prefix"
legacyFlag
=
"legacy"
///////////////// Broadcast subcommand flags //////////////////////////////
broadcastNameFlag
=
"name"
...
...
This diff is collapsed.
Click to expand it.
cmd/init.go
+
17
−
1
View file @
9e2fe243
...
...
@@ -45,16 +45,27 @@ var initCmd = &cobra.Command{
jww
.
FATAL
.
Panicf
(
"%+v"
,
err
)
}
identity
,
err
:=
xxdk
.
MakeReceptionIdentity
(
net
)
// Generate identity
var
identity
xxdk
.
ReceptionIdentity
if
viper
.
GetBool
(
legacyFlag
)
{
identity
,
err
=
xxdk
.
MakeLegacyReceptionIdentity
(
net
)
}
else
{
identity
,
err
=
xxdk
.
MakeReceptionIdentity
(
net
)
}
// 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
())
...
...
@@ -68,6 +79,11 @@ 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
(
legacyFlag
,
""
,
false
,
"Generates a legacy identity if set. "
+
"If this flag is absent, a standard identity will be generated."
)
bindFlagHelper
(
legacyFlag
,
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