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
30483891
Commit
30483891
authored
Feb 11, 2019
by
Sietse Ringers
Browse files
Add irmad as irma server subcommand
parent
7699c212
Changes
2
Show whitespace changes
Inline
Side-by-side
irma/cmd/server.go
0 → 100644
View file @
30483891
package
cmd
import
irmad
"github.com/privacybydesign/irmago/server/irmad/cmd"
func
init
()
{
irmad
.
RootCommand
.
Use
=
"server"
RootCmd
.
AddCommand
(
irmad
.
RootCommand
)
}
server/irmad/cmd/root.go
View file @
30483891
...
...
@@ -35,9 +35,7 @@ var RootCommand = &cobra.Command{
},
}
// Execute adds all child commands to the root command sets flags appropriately.
// This is called by main.main(). It only needs to happen once to the RootCommand.
func
Execute
()
{
func
init
()
{
logger
.
Level
=
logrus
.
InfoLevel
logger
.
SetFormatter
(
&
prefixed
.
TextFormatter
{
FullTimestamp
:
true
,
...
...
@@ -45,6 +43,11 @@ func Execute() {
if
err
:=
setFlags
(
RootCommand
);
err
!=
nil
{
die
(
errors
.
WrapPrefix
(
err
,
"Failed to attach flags to "
+
RootCommand
.
Name
()
+
" command"
,
0
))
}
}
// Execute adds all child commands to the root command sets flags appropriately.
// This is called by main.main(). It only needs to happen once to the RootCommand.
func
Execute
()
{
if
err
:=
RootCommand
.
Execute
();
err
!=
nil
{
die
(
errors
.
Wrap
(
err
,
0
))
}
...
...
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