@cryptotaxi247 / kubo / commits / 020827d30

Non-functional changes (#10996)

- remove unused min func - use maps.Clone

Andrew Gillis committed Sep 29, 2025 at 11:43 UTC 020827d30239561a87f5cd4da9a1ff94ca341539
2 files changed +4 -10
fuse/ipns/ipns_unix.go
-7
@@ -528,13 +528,6 @@ func (d *Directory) Rename(ctx context.Context, req *fuse.RenameRequest, newDir
528 return nil
529 }
530
531 -func min(a, b int) int {
532 - if a < b {
533 - return a
534 - }
535 - return b
536 -}
537 -
531 // to check that out Node implements all the interfaces we want.
532 type ipnsRoot interface {
533 fs.Node
repo/common/common.go
+4 -3
@@ -2,6 +2,7 @@ package common
2
3 import (
4 "fmt"
5 + "maps"
6 "strings"
7 )
8
@@ -65,9 +66,9 @@ func MapSetKV(v map[string]interface{}, key string, value interface{}) error {
66 // child maps until a non-map value is found.
67 func MapMergeDeep(left, right map[string]interface{}) map[string]interface{} {
68 // We want to alter a copy of the map, not the original
68 - result := make(map[string]interface{})
69 - for k, v := range left {
70 - result[k] = v
69 + result := maps.Clone(left)
70 + if result == nil {
71 + result = make(map[string]interface{})
72 }
73
74 for key, rightVal := range right {