mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-26 21:17:23 +00:00
fix SA4005: ineffective assignment to field PatchMeta.patchStrategies (staticcheck)
This commit is contained in:
parent
01a0fba362
commit
fa3c4b953f
@ -31,22 +31,22 @@ type PatchMeta struct {
|
|||||||
patchMergeKey string
|
patchMergeKey string
|
||||||
}
|
}
|
||||||
|
|
||||||
func (pm PatchMeta) GetPatchStrategies() []string {
|
func (pm *PatchMeta) GetPatchStrategies() []string {
|
||||||
if pm.patchStrategies == nil {
|
if pm.patchStrategies == nil {
|
||||||
return []string{}
|
return []string{}
|
||||||
}
|
}
|
||||||
return pm.patchStrategies
|
return pm.patchStrategies
|
||||||
}
|
}
|
||||||
|
|
||||||
func (pm PatchMeta) SetPatchStrategies(ps []string) {
|
func (pm *PatchMeta) SetPatchStrategies(ps []string) {
|
||||||
pm.patchStrategies = ps
|
pm.patchStrategies = ps
|
||||||
}
|
}
|
||||||
|
|
||||||
func (pm PatchMeta) GetPatchMergeKey() string {
|
func (pm *PatchMeta) GetPatchMergeKey() string {
|
||||||
return pm.patchMergeKey
|
return pm.patchMergeKey
|
||||||
}
|
}
|
||||||
|
|
||||||
func (pm PatchMeta) SetPatchMergeKey(pmk string) {
|
func (pm *PatchMeta) SetPatchMergeKey(pmk string) {
|
||||||
pm.patchMergeKey = pmk
|
pm.patchMergeKey = pmk
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user