Skip to content

Commit c6fe265

Browse files
committed
fix linting issue
1 parent 404b13a commit c6fe265

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

cmd/otel-allocator/config/config.go

+3-4
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,18 @@ import (
2525
"time"
2626

2727
"github.com/go-logr/logr"
28+
"github.com/go-viper/mapstructure/v2"
2829
"github.com/prometheus/common/model"
2930
promconfig "github.com/prometheus/prometheus/config"
3031
_ "github.com/prometheus/prometheus/discovery/install"
3132
"github.com/spf13/pflag"
32-
3333
"gopkg.in/yaml.v2"
3434
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
3535
"k8s.io/client-go/rest"
3636
"k8s.io/client-go/tools/clientcmd"
3737
"k8s.io/klog/v2"
3838
ctrl "sigs.k8s.io/controller-runtime"
3939
"sigs.k8s.io/controller-runtime/pkg/log/zap"
40-
41-
"github.com/go-viper/mapstructure/v2"
4240
)
4341

4442
const (
@@ -264,7 +262,8 @@ func unmarshal(cfg *Config, configFile string) error {
264262
}
265263

266264
m := make(map[string]interface{})
267-
if err := yaml.Unmarshal(yamlFile, &m); err != nil {
265+
err = yaml.Unmarshal(yamlFile, &m)
266+
if err != nil {
268267
return fmt.Errorf("error unmarshaling YAML: %w", err)
269268
}
270269

0 commit comments

Comments
 (0)