fix SA4005: ineffective assignment to field PatchMeta.patchStrategies (staticcheck)

This commit is contained in:
Antonio Ojea 2021-11-16 17:05:50 +01:00
parent 01a0fba362
commit fa3c4b953f

View File

@ -31,22 +31,22 @@ type PatchMeta struct {
patchMergeKey string
}
func (pm PatchMeta) GetPatchStrategies() []string {
func (pm *PatchMeta) GetPatchStrategies() []string {
if pm.patchStrategies == nil {
return []string{}
}
return pm.patchStrategies
}
func (pm PatchMeta) SetPatchStrategies(ps []string) {
func (pm *PatchMeta) SetPatchStrategies(ps []string) {
pm.patchStrategies = ps
}
func (pm PatchMeta) GetPatchMergeKey() string {
func (pm *PatchMeta) GetPatchMergeKey() string {
return pm.patchMergeKey
}
func (pm PatchMeta) SetPatchMergeKey(pmk string) {
func (pm *PatchMeta) SetPatchMergeKey(pmk string) {
pm.patchMergeKey = pmk
}