Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Simon Schürg
actl
Commits
3fdc8a3b
Commit
3fdc8a3b
authored
Oct 13, 2020
by
Simon Schürg
🚀
Browse files
Add keygen command
parent
cfbce07a
Changes
1
Hide whitespace changes
Inline
Side-by-side
cmd/keygen.go
0 → 100644
View file @
3fdc8a3b
package
cmd
import
(
"log"
"github.com/spf13/cobra"
)
var
keygenCmd
=
&
cobra
.
Command
{
Use
:
"keygen"
,
Short
:
"Generates a key(pair) for JWS signing and verifying."
,
Long
:
`Generates a key(pair) for JWS signing and verifying.`
,
Run
:
func
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
log
.
Fatalln
(
"This command is not yet implemented!"
)
},
}
var
use
string
var
alg
string
func
init
()
{
keygenCmd
.
Flags
()
.
StringVar
(
&
alg
,
"alg"
,
""
,
"Algorithm"
)
keygenCmd
.
Flags
()
.
StringVar
(
&
use
,
"use"
,
""
,
"Key usage (sign or enc)"
)
rootCmd
.
AddCommand
(
keygenCmd
)
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment