mirror of
https://github.com/go-acme/lego
synced 2026-03-14 14:35:48 +01:00
refactor: isolate RootPathWarningMessage
This commit is contained in:
parent
f09752537d
commit
0fabf2bda4
3 changed files with 13 additions and 13 deletions
|
|
@ -19,17 +19,6 @@ import (
|
|||
"github.com/urfave/cli/v3"
|
||||
)
|
||||
|
||||
const rootPathWarningMessage = `!!!! HEADS UP !!!!
|
||||
|
||||
Your account credentials have been saved in your
|
||||
configuration directory at "%s".
|
||||
|
||||
You should make a secure backup of this folder now. This
|
||||
configuration directory will also contain private keys
|
||||
generated by lego and certificates obtained from the ACME
|
||||
server. Making regular backups of this folder is ideal.
|
||||
`
|
||||
|
||||
func createRegister() *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "register",
|
||||
|
|
@ -71,7 +60,7 @@ func register(ctx context.Context, cmd *cli.Command) error {
|
|||
return fmt.Errorf("could not save the account file: %w", err)
|
||||
}
|
||||
|
||||
fmt.Printf(rootPathWarningMessage, accountsStorage.GetRootPath())
|
||||
fmt.Printf(storage.RootPathWarningMessage, accountsStorage.GetRootPath())
|
||||
} else {
|
||||
log.Info("Account already registered, skipping.")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ func run(ctx context.Context, cmd *cli.Command) error {
|
|||
return fmt.Errorf("could not save the account file: %w", err)
|
||||
}
|
||||
|
||||
fmt.Printf(rootPathWarningMessage, accountsStorage.GetRootPath())
|
||||
fmt.Printf(storage.RootPathWarningMessage, accountsStorage.GetRootPath())
|
||||
}
|
||||
|
||||
setupChallenges(cmd, client)
|
||||
|
|
|
|||
|
|
@ -19,6 +19,17 @@ import (
|
|||
"github.com/go-acme/lego/v5/log"
|
||||
)
|
||||
|
||||
const RootPathWarningMessage = `!!!! HEADS UP !!!!
|
||||
|
||||
Your account credentials have been saved in your
|
||||
configuration directory at "%s".
|
||||
|
||||
You should make a secure backup of this folder now. This
|
||||
configuration directory will also contain private keys
|
||||
generated by lego and certificates obtained from the ACME
|
||||
server. Making regular backups of this folder is ideal.
|
||||
`
|
||||
|
||||
const (
|
||||
baseAccountsRootFolderName = "accounts"
|
||||
accountFileName = "account.json"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue