This is an automated email from the ASF dual-hosted git repository.
zhongxjian pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo-kubernetes.git
The following commit(s) were added to refs/heads/master by this push:
new 70e7e0da [operator] validate command completed
70e7e0da is described below
commit 70e7e0da2fa9079d770bea374e8869d4b5c94e05
Author: mfordjody <[email protected]>
AuthorDate: Thu Dec 26 11:42:25 2024 +0800
[operator] validate command completed
---
dubboctl/pkg/validate/validate.go | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/dubboctl/pkg/validate/validate.go
b/dubboctl/pkg/validate/validate.go
index bc7c6750..640f6360 100644
--- a/dubboctl/pkg/validate/validate.go
+++ b/dubboctl/pkg/validate/validate.go
@@ -120,6 +120,8 @@ func NewValidateCommand(ctx cli.Context) *cobra.Command {
return validateFiles(&dn, files, cmd.OutOrStderr())
},
}
+ flags := vc.PersistentFlags()
+ flags.StringSliceVarP(&files, "filename", "f", nil, "Inputs of files to
validate")
return vc
}
@@ -195,6 +197,7 @@ func validateFiles(dubboNamespace *string, files []string,
writer io.Writer) err
errs = multierror.Append(errs, err)
}
}
+
files = []string{}
for p := range processedFiles {
files = append(files, p)
@@ -217,7 +220,7 @@ func validateFiles(dubboNamespace *string, files []string,
writer io.Writer) err
if w := warningsByFilename[fname]; w != nil {
_, _ = fmt.Fprint(writer, warningToString(w))
} else {
- _, _ = fmt.Fprintf(writer, "validation
succeed\n")
+ _, _ = fmt.Fprintf(writer, "validation
successfully completed\n")
}
break
}