mirror of
https://github.com/docker/compose.git
synced 2025-09-18 15:27:45 +02:00
Refactor to use maps.Copy
Signed-off-by: cuiweixie <cuiweixie@gmail.com>
This commit is contained in:
parent
f266715dd0
commit
3bac9ffd08
@ -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
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user