mirror of https://github.com/databricks/cli.git
silent errcheck
This commit is contained in:
parent
f94b50db63
commit
df67c28a05
|
@ -437,8 +437,8 @@ func NewGenerateDashboardCommand() *cobra.Command {
|
||||||
// Included for symmetry with the other generate commands, but we prefer the shorter flags.
|
// Included for symmetry with the other generate commands, but we prefer the shorter flags.
|
||||||
cmd.Flags().StringVar(&d.existingPath, "existing-dashboard-path", "", `workspace path of the dashboard to generate configuration for`)
|
cmd.Flags().StringVar(&d.existingPath, "existing-dashboard-path", "", `workspace path of the dashboard to generate configuration for`)
|
||||||
cmd.Flags().StringVar(&d.existingID, "existing-dashboard-id", "", `ID of the dashboard to generate configuration for`)
|
cmd.Flags().StringVar(&d.existingID, "existing-dashboard-id", "", `ID of the dashboard to generate configuration for`)
|
||||||
cmd.Flags().MarkHidden("existing-dashboard-path")
|
_ = cmd.Flags().MarkHidden("existing-dashboard-path")
|
||||||
cmd.Flags().MarkHidden("existing-dashboard-id")
|
_ = cmd.Flags().MarkHidden("existing-dashboard-id")
|
||||||
|
|
||||||
// Output flags.
|
// Output flags.
|
||||||
cmd.Flags().StringVarP(&d.resourceDir, "resource-dir", "d", "./resources", `directory to write the configuration to`)
|
cmd.Flags().StringVarP(&d.resourceDir, "resource-dir", "d", "./resources", `directory to write the configuration to`)
|
||||||
|
@ -460,7 +460,7 @@ func NewGenerateDashboardCommand() *cobra.Command {
|
||||||
cmd.MarkFlagsMutuallyExclusive("watch", "existing-id")
|
cmd.MarkFlagsMutuallyExclusive("watch", "existing-id")
|
||||||
|
|
||||||
// Completion for the resource flag.
|
// Completion for the resource flag.
|
||||||
cmd.RegisterFlagCompletionFunc("resource", dashboardResourceCompletion)
|
_ = cmd.RegisterFlagCompletionFunc("resource", dashboardResourceCompletion)
|
||||||
|
|
||||||
cmd.RunE = d.RunE
|
cmd.RunE = d.RunE
|
||||||
return cmd
|
return cmd
|
||||||
|
|
|
@ -73,7 +73,7 @@ func newSummaryCommand() *cobra.Command {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
cmd.OutOrStdout().Write(buf)
|
_, _ = cmd.OutOrStdout().Write(buf)
|
||||||
default:
|
default:
|
||||||
return fmt.Errorf("unknown output type %s", root.OutputType(cmd))
|
return fmt.Errorf("unknown output type %s", root.OutputType(cmd))
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,6 +69,6 @@ func initProgressLoggerFlag(cmd *cobra.Command, logFlags *logFlags) *progressLog
|
||||||
if err := flags.MarkHidden("progress-format"); err != nil {
|
if err := flags.MarkHidden("progress-format"); err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
cmd.RegisterFlagCompletionFunc("progress-format", f.ProgressLogFormat.Complete)
|
_ = cmd.RegisterFlagCompletionFunc("progress-format", f.ProgressLogFormat.Complete)
|
||||||
return &f
|
return &f
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue