Refactor to use maps.Copy

Signed-off-by: cuiweixie <[email protected]>
This commit is contained in:
cuiweixie
2025-08-25 08:57:52 +02:00
committed by Nicolas De loof
parent f266715dd0
commit 3bac9ffd08
+2 -3
View File
@@ -20,6 +20,7 @@ import (
"context"
"errors"
"fmt"
"maps"
"slices"
"sort"
"strconv"
@@ -931,9 +932,7 @@ func (s *composeService) startService(ctx context.Context,
func mergeLabels(ls ...types.Labels) types.Labels {
merged := types.Labels{}
for _, l := range ls {
for k, v := range l {
merged[k] = v
}
maps.Copy(merged, l)
}
return merged
}