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
IRMA
Github mirrors
irmago
Commits
9ee7a391
Commit
9ee7a391
authored
Mar 10, 2019
by
Sietse Ringers
Browse files
Add irma version subcommand
parent
d8961cb2
Changes
1
Hide whitespace changes
Inline
Side-by-side
irma/cmd/root.go
View file @
9ee7a391
...
...
@@ -3,6 +3,7 @@ package cmd
import
(
"fmt"
"os"
"runtime"
"github.com/spf13/cobra"
)
...
...
@@ -23,6 +24,18 @@ func Execute() {
}
}
func
init
()
{
RootCmd
.
AddCommand
(
&
cobra
.
Command
{
Use
:
"version"
,
Short
:
"Print irma version information"
,
Run
:
func
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
fmt
.
Println
(
"irma"
)
fmt
.
Println
(
"Version: "
,
"0.1.0"
)
fmt
.
Println
(
"OS/Arg: "
,
runtime
.
GOOS
+
"/"
+
runtime
.
GOARCH
)
},
})
}
func
die
(
message
string
,
err
error
)
{
var
m
string
if
message
!=
""
{
...
...
Write
Preview
Markdown
is supported
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