From 2a72a57dc8fa7dcd1e624af41e0fa197a2ce64ea Mon Sep 17 00:00:00 2001 From: Jarek Kowalski Date: Tue, 20 Feb 2018 22:47:40 -0800 Subject: [PATCH] cleanup --- snapshot/policy_manager.go | 2 +- snapshot/source.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/snapshot/policy_manager.go b/snapshot/policy_manager.go index 61b6405a8..44ba085e5 100644 --- a/snapshot/policy_manager.go +++ b/snapshot/policy_manager.go @@ -39,7 +39,7 @@ func (m *PolicyManager) GetEffectivePolicy(si SourceInfo) (*Policy, error) { md = append(md, m.repository.Manifests.Find(labelsForSource(SourceInfo{Host: si.Host}))...) // Global policy. - md = append(md, m.repository.Manifests.Find(labelsForSource(SourceInfo{}))...) + md = append(md, m.repository.Manifests.Find(labelsForSource(GlobalPolicySourceInfo))...) var policies []*Policy for _, em := range md { diff --git a/snapshot/source.go b/snapshot/source.go index af8747000..8901ab43c 100644 --- a/snapshot/source.go +++ b/snapshot/source.go @@ -32,7 +32,7 @@ func (ssi SourceInfo) String() string { // or may be 'username@host:path' where path, username and host are not processed. func ParseSourceInfo(path string, hostname string, username string) (SourceInfo, error) { if path == "(global)" { - return SourceInfo{}, nil + return GlobalPolicySourceInfo, nil } p1 := strings.Index(path, "@")