File tree 1 file changed +3
-4
lines changed
cmd/otel-allocator/config
1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -25,20 +25,18 @@ import (
25
25
"time"
26
26
27
27
"github.com/go-logr/logr"
28
+ "github.com/go-viper/mapstructure/v2"
28
29
"github.com/prometheus/common/model"
29
30
promconfig "github.com/prometheus/prometheus/config"
30
31
_ "github.com/prometheus/prometheus/discovery/install"
31
32
"github.com/spf13/pflag"
32
-
33
33
"gopkg.in/yaml.v2"
34
34
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
35
35
"k8s.io/client-go/rest"
36
36
"k8s.io/client-go/tools/clientcmd"
37
37
"k8s.io/klog/v2"
38
38
ctrl "sigs.k8s.io/controller-runtime"
39
39
"sigs.k8s.io/controller-runtime/pkg/log/zap"
40
-
41
- "github.com/go-viper/mapstructure/v2"
42
40
)
43
41
44
42
const (
@@ -264,7 +262,8 @@ func unmarshal(cfg *Config, configFile string) error {
264
262
}
265
263
266
264
m := make (map [string ]interface {})
267
- if err := yaml .Unmarshal (yamlFile , & m ); err != nil {
265
+ err = yaml .Unmarshal (yamlFile , & m )
266
+ if err != nil {
268
267
return fmt .Errorf ("error unmarshaling YAML: %w" , err )
269
268
}
270
269
You can’t perform that action at this time.
0 commit comments