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
c627d51f
Commit
c627d51f
authored
Mar 04, 2019
by
Sietse Ringers
Browse files
Disable log colors on Windows
parent
f466aa7b
Changes
1
Show whitespace changes
Inline
Side-by-side
server/irmad/cmd/root.go
View file @
c627d51f
...
@@ -3,6 +3,7 @@ package cmd
...
@@ -3,6 +3,7 @@ package cmd
import
(
import
(
"io/ioutil"
"io/ioutil"
"path/filepath"
"path/filepath"
"runtime"
"strings"
"strings"
"github.com/go-errors/errors"
"github.com/go-errors/errors"
...
@@ -39,6 +40,7 @@ func init() {
...
@@ -39,6 +40,7 @@ func init() {
logger
.
Level
=
logrus
.
InfoLevel
logger
.
Level
=
logrus
.
InfoLevel
logger
.
SetFormatter
(
&
prefixed
.
TextFormatter
{
logger
.
SetFormatter
(
&
prefixed
.
TextFormatter
{
FullTimestamp
:
true
,
FullTimestamp
:
true
,
DisableColors
:
runtime
.
GOOS
==
"windows"
,
})
})
if
err
:=
setFlags
(
RootCommand
);
err
!=
nil
{
if
err
:=
setFlags
(
RootCommand
);
err
!=
nil
{
die
(
errors
.
WrapPrefix
(
err
,
"Failed to attach flags to "
+
RootCommand
.
Name
()
+
" command"
,
0
))
die
(
errors
.
WrapPrefix
(
err
,
"Failed to attach flags to "
+
RootCommand
.
Name
()
+
" command"
,
0
))
...
...
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