Skip to content

Commit b6a5fe1

Browse files
committed
fix: resolve ineffectual assignment lint errors in cmd/local.go
Signed-off-by: yxxhero <aiopsclub@163.com>
1 parent 844b491 commit b6a5fe1

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

cmd/local.go

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,13 @@ func (l *local) run() error {
132132
excludes = []string{}
133133
}
134134

135-
specs1 := manifest.Parse(manifest1, l.namespace, l.normalizeManifests, excludes...)
136-
specs2 := manifest.Parse(manifest2, l.namespace, l.normalizeManifests, excludes...)
137-
manifest1 = nil
138-
manifest2 = nil
135+
var specs1, specs2 map[string]*manifest.MappingResult
136+
func() {
137+
specs1 = manifest.Parse(manifest1, l.namespace, l.normalizeManifests, excludes...)
138+
specs2 = manifest.Parse(manifest2, l.namespace, l.normalizeManifests, excludes...)
139+
manifest1 = nil
140+
manifest2 = nil
141+
}()
139142

140143
seenAnyChanges := diff.Manifests(specs1, specs2, &l.Options, os.Stdout)
141144

0 commit comments

Comments
 (0)