chore: Fix typo, coral -> cobra (#5325)

This commit is contained in:
Y.Horie 2023-01-22 00:27:58 +09:00 committed by GitHub
parent c38a040e85
commit 8d6870fd06
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -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,

View File

@ -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]$`)