Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
KIT-CA
dfnpkitool
Commits
dcd4c8d0
Commit
dcd4c8d0
authored
Aug 16, 2020
by
Heiko Reese
Browse files
cleanups
parent
88f27a38
Pipeline
#104811
passed with stage
in 19 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
cmd/root.go
View file @
dcd4c8d0
...
...
@@ -110,8 +110,6 @@ func init() {
rootCmd
.
PersistentFlags
()
.
StringVarP
(
&
cmdArguments
.
CAName
,
"ca"
,
"C"
,
""
,
"Certification Authority identifier"
)
rootCmd
.
PersistentFlags
()
.
IntVarP
(
&
cmdArguments
.
RAId
,
"ra-id"
,
"R"
,
0
,
"Sub-RA identifier (usually 0 for main RA)"
)
//viper.BindPFlag("ca", rootCmd.PersistentFlags().Lookup("ca"))
//viper.BindPFlag("raid", rootCmd.PersistentFlags().Lookup("ra-id"))
viper
.
BindPFlags
(
rootCmd
.
PersistentFlags
())
}
...
...
@@ -135,7 +133,8 @@ func initConfig() {
// If a config file is found, read it in.
err
:=
viper
.
ReadInConfig
()
if
err
==
nil
{
log
.
Println
(
"Using config file:"
,
viper
.
ConfigFileUsed
())
if
err
!=
nil
{
//log.Println("Using config file:", viper.ConfigFileUsed())
log
.
Println
(
"Error reading config file: "
,
err
)
}
}
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