summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorMiloslav Trmač <mitr@redhat.com>2022-08-24 20:07:54 +0200
committerMiloslav Trmač <mitr@redhat.com>2022-08-29 17:55:38 +0200
commite8cd43b414352a0488b02dad3b064a23996d1ba8 (patch)
tree232cd101f98c2a8fe0265d564fc770bd82fdd0bb /pkg
parentd4f18670e887f5658d77259feae9c32867bebf1b (diff)
downloadpodman-e8cd43b414352a0488b02dad3b064a23996d1ba8.tar.gz
podman-e8cd43b414352a0488b02dad3b064a23996d1ba8.tar.bz2
podman-e8cd43b414352a0488b02dad3b064a23996d1ba8.zip
Rename tempTrustShowOutput to entry
Now that it is the primary return value of a small function, the long name only makes reading harder. Should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Diffstat (limited to 'pkg')
-rw-r--r--pkg/trust/trust.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/pkg/trust/trust.go b/pkg/trust/trust.go
index 2d6f1fb87..dd4262648 100644
--- a/pkg/trust/trust.go
+++ b/pkg/trust/trust.go
@@ -85,8 +85,8 @@ func getPolicyShowOutput(policyContentStruct policyContent, systemRegistriesDirP
// descriptionsOfPolicyRequirements turns reqs into user-readable policy entries, with Transport/Name/Reponame coming from template, potentially looking up scope in registryConfigs.
func descriptionsOfPolicyRequirements(reqs []repoContent, template Policy, registryConfigs *registryConfiguration, scope string, idReader gpgIDReader) []*Policy {
- tempTrustShowOutput := template
- tempTrustShowOutput.Type = trustTypeDescription(reqs[0].Type)
+ entry := template
+ entry.Type = trustTypeDescription(reqs[0].Type)
uids := []string{}
for _, repoele := range reqs {
if len(repoele.KeyPath) > 0 {
@@ -96,15 +96,15 @@ func descriptionsOfPolicyRequirements(reqs []repoContent, template Policy, regis
uids = append(uids, getGPGIdFromKeyData(idReader, repoele.KeyData)...)
}
}
- tempTrustShowOutput.GPGId = strings.Join(uids, ", ")
+ entry.GPGId = strings.Join(uids, ", ")
registryNamespace := haveMatchRegistry(scope, registryConfigs)
if registryNamespace != nil {
if registryNamespace.Lookaside != "" {
- tempTrustShowOutput.SignatureStore = registryNamespace.Lookaside
+ entry.SignatureStore = registryNamespace.Lookaside
} else { // incl. registryNamespace.SigStore == ""
- tempTrustShowOutput.SignatureStore = registryNamespace.SigStore
+ entry.SignatureStore = registryNamespace.SigStore
}
}
- return []*Policy{&tempTrustShowOutput}
+ return []*Policy{&entry}
}