mirror of https://github.com/databricks/cli.git
annotate with nolint:errcheck
This commit is contained in:
parent
16d412aa67
commit
d59dd39e57
|
@ -21,8 +21,7 @@ func initOutputFlag(cmd *cobra.Command) *outputFlag {
|
||||||
// Configure defaults from environment, if applicable.
|
// Configure defaults from environment, if applicable.
|
||||||
// If the provided value is invalid it is ignored.
|
// If the provided value is invalid it is ignored.
|
||||||
if v, ok := env.Lookup(cmd.Context(), envOutputFormat); ok {
|
if v, ok := env.Lookup(cmd.Context(), envOutputFormat); ok {
|
||||||
// QQQ log the error?
|
f.output.Set(v) //nolint:errcheck
|
||||||
_ = f.output.Set(v)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd.PersistentFlags().VarP(&f.output, "output", "o", "output type: text or json")
|
cmd.PersistentFlags().VarP(&f.output, "output", "o", "output type: text or json")
|
||||||
|
|
|
@ -84,14 +84,13 @@ func initLogFlags(cmd *cobra.Command) *logFlags {
|
||||||
// Configure defaults from environment, if applicable.
|
// Configure defaults from environment, if applicable.
|
||||||
// If the provided value is invalid it is ignored.
|
// If the provided value is invalid it is ignored.
|
||||||
if v, ok := env.Lookup(cmd.Context(), envLogFile); ok {
|
if v, ok := env.Lookup(cmd.Context(), envLogFile); ok {
|
||||||
// QQQ log the error? here and below
|
f.file.Set(v) //nolint:errcheck
|
||||||
_ = f.file.Set(v)
|
|
||||||
}
|
}
|
||||||
if v, ok := env.Lookup(cmd.Context(), envLogLevel); ok {
|
if v, ok := env.Lookup(cmd.Context(), envLogLevel); ok {
|
||||||
_ = f.level.Set(v)
|
f.level.Set(v) //nolint:errcheck
|
||||||
}
|
}
|
||||||
if v, ok := env.Lookup(cmd.Context(), envLogFormat); ok {
|
if v, ok := env.Lookup(cmd.Context(), envLogFormat); ok {
|
||||||
_ = f.output.Set(v)
|
f.output.Set(v) //nolint:errcheck
|
||||||
}
|
}
|
||||||
|
|
||||||
flags := cmd.PersistentFlags()
|
flags := cmd.PersistentFlags()
|
||||||
|
|
Loading…
Reference in New Issue