1
Fork 0
mirror of https://github.com/caddyserver/caddy.git synced 2024-12-16 21:56:40 -05:00

cmd: replace deprecate func use (#5170)

This commit is contained in:
Mohammed Al Sahaf 2022-10-25 17:56:38 +03:00 committed by GitHub
parent 798c4a3ba4
commit f20a8e7aa0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -456,7 +456,7 @@ argument of --directory. If the directory does not exist, it will be created.
`, rootCmd.Root().Name()),
DisableFlagsInUseLine: true,
ValidArgs: []string{"bash", "zsh", "fish", "powershell"},
Args: cobra.ExactValidArgs(1),
Args: cobra.MatchAll(cobra.ExactArgs(1), cobra.OnlyValidArgs),
RunE: func(cmd *cobra.Command, args []string) error {
switch args[0] {
case "bash":