From 2232d9f19b170aeed66e041d8452fdaee317a8ee Mon Sep 17 00:00:00 2001 From: "Florian Rusch (cluetec GmbH)" Date: Thu, 2 Nov 2023 06:59:54 +0100 Subject: [PATCH] add review suggestions --- internal/config/config.go | 2 +- internal/config/viper.go | 1 - internal/destination/filesystem/config.go | 2 +- internal/source/filesystem/config.go | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/internal/config/config.go b/internal/config/config.go index ad07e75..1f276eb 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -24,7 +24,7 @@ import ( type ResourceConfig struct { Type string - NestedConfig map[string]interface{} `mapstructure:",remain"` + NestedConfig map[string]any `mapstructure:",remain"` } type Config struct { diff --git a/internal/config/viper.go b/internal/config/viper.go index dab07d6..6bcd575 100644 --- a/internal/config/viper.go +++ b/internal/config/viper.go @@ -23,7 +23,6 @@ import ( ) func InitViper() error { - //v := viper.New() viper.AutomaticEnv() viper.SetEnvKeyReplacer(strings.NewReplacer(".", "_")) viper.AddConfigPath(".") diff --git a/internal/destination/filesystem/config.go b/internal/destination/filesystem/config.go index 2b835de..a495943 100644 --- a/internal/destination/filesystem/config.go +++ b/internal/destination/filesystem/config.go @@ -27,7 +27,7 @@ type Config struct { Path string } -func New(c map[string]interface{}) (*Config, error) { +func New(c map[string]any) (*Config, error) { var filesystemConfig Config err := mapstructure.Decode(c, &filesystemConfig) diff --git a/internal/source/filesystem/config.go b/internal/source/filesystem/config.go index e4a1c3e..3013f79 100644 --- a/internal/source/filesystem/config.go +++ b/internal/source/filesystem/config.go @@ -27,7 +27,7 @@ type Config struct { Path string } -func New(c map[string]interface{}) (*Config, error) { +func New(c map[string]any) (*Config, error) { var filesystemConfig Config err := mapstructure.Decode(c, &filesystemConfig)