Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Rook
Commits
c36868eb
Commit
c36868eb
authored
4 years ago
by
Travis Nielsen
Committed by
GitHub
4 years ago
Browse files
Options
Download
Plain Diff
Merge pull request #6720 from cloudical-io/fix_label_merge
core: fix label merge
parents
5b72a3f8
48d21947
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pkg/apis/rook.io/v1/labels.go
+5
-3
pkg/apis/rook.io/v1/labels.go
with
5 additions
and
3 deletions
+5
-3
pkg/apis/rook.io/v1/labels.go
+
5
-
3
View file @
c36868eb
...
...
@@ -40,9 +40,11 @@ func (a Labels) ApplyToObjectMeta(t *metav1.ObjectMeta) {
// original Labels with the attributes of the supplied one. The supplied
// Labels attributes will override the original ones if defined.
func
(
a
Labels
)
Merge
(
with
Labels
)
Labels
{
ret
:=
a
if
ret
==
nil
{
ret
=
map
[
string
]
string
{}
ret
:=
Labels
{}
for
k
,
v
:=
range
a
{
if
_
,
ok
:=
ret
[
k
];
!
ok
{
ret
[
k
]
=
v
}
}
for
k
,
v
:=
range
with
{
if
_
,
ok
:=
ret
[
k
];
!
ok
{
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help