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
8406be4b
Commit
8406be4b
authored
2 years ago
by
Josh Brooks
Browse files
Options
Downloads
Patches
Plain Diff
Add setLegacy flag
parent
7d39a948
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
+15
-3
15 additions, 3 deletions
cmd/init.go
with
16 additions
and
3 deletions
cmd/flags.go
+
1
−
0
View file @
8406be4b
...
...
@@ -81,6 +81,7 @@ const (
sendIdFlag
=
"sendid"
profileCpuFlag
=
"profile-cpu"
userIdPrefixFlag
=
"userid-prefix"
setLegacyFlag
=
"setLegacy"
///////////////// Broadcast subcommand flags //////////////////////////////
broadcastNameFlag
=
"name"
...
...
This diff is collapsed.
Click to expand it.
cmd/init.go
+
15
−
3
View file @
8406be4b
...
...
@@ -45,9 +45,17 @@ var initCmd = &cobra.Command{
jww
.
FATAL
.
Panicf
(
"%+v"
,
err
)
}
identity
,
err
:=
xxdk
.
MakeReceptionIdentity
(
net
)
if
err
!=
nil
{
jww
.
FATAL
.
Panicf
(
"%+v"
,
err
)
var
identity
xxdk
.
ReceptionIdentity
if
viper
.
GetBool
(
setLegacyFlag
)
{
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
)
}
}
err
=
xxdk
.
StoreReceptionIdentity
(
identityStorageKey
,
identity
,
net
)
...
...
@@ -68,6 +76,10 @@ 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
(
setLegacyFlag
,
""
,
false
,
"Generates a legacy contact file if set. Otherwise generates a standard contact file."
)
bindFlagHelper
(
setLegacyFlag
,
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