Skip to content

Commit

Permalink
fix linting issue
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhaja committed Jan 14, 2025
1 parent 404b13a commit c6fe265
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions cmd/otel-allocator/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,18 @@ import (
"time"

"github.com/go-logr/logr"
"github.com/go-viper/mapstructure/v2"
"github.com/prometheus/common/model"
promconfig "github.com/prometheus/prometheus/config"
_ "github.com/prometheus/prometheus/discovery/install"
"github.com/spf13/pflag"

"gopkg.in/yaml.v2"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/rest"
"k8s.io/client-go/tools/clientcmd"
"k8s.io/klog/v2"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/log/zap"

"github.com/go-viper/mapstructure/v2"
)

const (
Expand Down Expand Up @@ -264,7 +262,8 @@ func unmarshal(cfg *Config, configFile string) error {
}

m := make(map[string]interface{})
if err := yaml.Unmarshal(yamlFile, &m); err != nil {
err = yaml.Unmarshal(yamlFile, &m)
if err != nil {
return fmt.Errorf("error unmarshaling YAML: %w", err)
}

Expand Down

0 comments on commit c6fe265

Please sign in to comment.