move code around
This commit is contained in:
parent
036793157b
commit
e88cbff863
10
cmd/root.go
10
cmd/root.go
@ -14,17 +14,17 @@ import (
|
||||
var command = &cobra.Command{
|
||||
Use: "local-ip.sh",
|
||||
PreRun: func(cmd *cobra.Command, args []string) {
|
||||
staging, err := cmd.Flags().GetBool("staging")
|
||||
if err != nil {
|
||||
utils.Logger.Fatal().Err(err).Msg("Unexpected error")
|
||||
}
|
||||
|
||||
nameservers, err := cmd.Flags().GetString("nameservers")
|
||||
if err != nil {
|
||||
utils.Logger.Fatal().Err(err).Msg("Unexpected error")
|
||||
}
|
||||
viper.Set("NameServers", strings.Split(nameservers, ","))
|
||||
|
||||
staging, err := cmd.Flags().GetBool("staging")
|
||||
if err != nil {
|
||||
utils.Logger.Fatal().Err(err).Msg("Unexpected error")
|
||||
}
|
||||
|
||||
var caDir string
|
||||
if staging {
|
||||
caDir = lego.LEDirectoryStaging
|
||||
|
Loading…
Reference in New Issue
Block a user