@@ -55,15 +55,6 @@ const (
5555// This is not an error condition but a successful operation that displays plugin information
5656var ErrPluginListRequested = errors .New ("plugin list requested" )
5757
58- // convertToStringAnyMap converts map[string]interface{} to map[string]any for YAML compatibility
59- func convertToStringAnyMap (m map [string ]interface {}) map [string ]any {
60- result := make (map [string ]any )
61- for k , v := range m {
62- result [k ] = v
63- }
64- return result
65- }
66-
6758type tempConfig struct {
6859 Config * Config `yaml:"config,omitempty"`
6960 Database * databaseConfig `yaml:"database,omitempty"`
@@ -240,14 +231,14 @@ func LoadConfig(configFile string) (*Config, error) {
240231 if val , ok := v .(map [string ]any ); ok {
241232 blobConfig [k ] = val
242233 } else if val , ok := v .(map [any ]any ); ok {
243- // Convert map[any]any to map[string]interface{} then to map[string] any
244- stringInterfaceMap := make (map [string ]interface {} )
234+ // Convert map[any]any to map[string]any
235+ stringAnyMap := make (map [string ]any )
245236 for vk , vv := range val {
246237 if keyStr , ok := vk .(string ); ok {
247- stringInterfaceMap [keyStr ] = vv
238+ stringAnyMap [keyStr ] = vv
248239 }
249240 }
250- blobConfig [k ] = convertToStringAnyMap ( stringInterfaceMap )
241+ blobConfig [k ] = stringAnyMap
251242 } else {
252243 // Log skipped non-map config entries
253244 fmt .Fprintf (os .Stderr , "warning: skipping blob config entry %q: expected map, got %T\n " , k , v )
@@ -275,14 +266,14 @@ func LoadConfig(configFile string) (*Config, error) {
275266 if val , ok := v .(map [string ]any ); ok {
276267 metadataConfig [k ] = val
277268 } else if val , ok := v .(map [any ]any ); ok {
278- // Convert map[any]any to map[string]interface{} then to map[string] any
279- stringInterfaceMap := make (map [string ]interface {} )
269+ // Convert map[any]any to map[string]any
270+ stringAnyMap := make (map [string ]any )
280271 for vk , vv := range val {
281272 if keyStr , ok := vk .(string ); ok {
282- stringInterfaceMap [keyStr ] = vv
273+ stringAnyMap [keyStr ] = vv
283274 }
284275 }
285- metadataConfig [k ] = convertToStringAnyMap ( stringInterfaceMap )
276+ metadataConfig [k ] = stringAnyMap
286277 } else {
287278 // Log skipped non-map config entries
288279 fmt .Fprintf (os .Stderr , "warning: skipping metadata config entry %q: expected map, got %T\n " , k , v )
0 commit comments