mirror of
https://github.com/caddyserver/caddy.git
synced 2024-11-24 22:53:07 +08:00
chore: Fix typo, coral -> cobra (#5325)
This commit is contained in:
parent
c38a040e85
commit
8d6870fd06
|
@ -104,7 +104,7 @@ func init() {
|
|||
rootCmd.SetHelpTemplate(rootCmd.HelpTemplate() + "\n" + fullDocsFooter + "\n")
|
||||
}
|
||||
|
||||
func caddyCmdToCoral(caddyCmd Command) *cobra.Command {
|
||||
func caddyCmdToCobra(caddyCmd Command) *cobra.Command {
|
||||
cmd := &cobra.Command{
|
||||
Use: caddyCmd.Name,
|
||||
Short: caddyCmd.Short,
|
||||
|
|
|
@ -504,7 +504,7 @@ func RegisterCommand(cmd Command) {
|
|||
if !commandNameRegex.MatchString(cmd.Name) {
|
||||
panic("invalid command name")
|
||||
}
|
||||
rootCmd.AddCommand(caddyCmdToCoral(cmd))
|
||||
rootCmd.AddCommand(caddyCmdToCobra(cmd))
|
||||
}
|
||||
|
||||
var commandNameRegex = regexp.MustCompile(`^[a-z0-9]$|^([a-z0-9]+-?[a-z0-9]*)+[a-z0-9]$`)
|
||||
|
|
Loading…
Reference in New Issue
Block a user