From 34156e75564acccd0451cfa3617244f961983d5c Mon Sep 17 00:00:00 2001 From: Revital Sur Date: Sun, 30 Jan 2022 10:48:05 +0200 Subject: [PATCH] Make ParseReference visible outside of registry package. Signed-off-by: Revital Sur --- pkg/registry/client.go | 4 ++-- pkg/registry/util.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/registry/client.go b/pkg/registry/client.go index 26aae46a4..47ddff2fa 100644 --- a/pkg/registry/client.go +++ b/pkg/registry/client.go @@ -247,7 +247,7 @@ type ( // Pull downloads a chart from a registry func (c *Client) Pull(ref string, options ...PullOption) (*PullResult, error) { - parsedRef, err := parseReference(ref) + parsedRef, err := ParseReference(ref) if err != nil { return nil, err } @@ -458,7 +458,7 @@ type ( // Push uploads a chart to a registry. func (c *Client) Push(data []byte, ref string, options ...PushOption) (*PushResult, error) { - parsedRef, err := parseReference(ref) + parsedRef, err := ParseReference(ref) if err != nil { return nil, err } diff --git a/pkg/registry/util.go b/pkg/registry/util.go index 47eed267f..c9b8578fd 100644 --- a/pkg/registry/util.go +++ b/pkg/registry/util.go @@ -105,11 +105,11 @@ func ctx(out io.Writer, debug bool) context.Context { return ctx } -// parseReference will parse and validate the reference, and clean tags when +// ParseReference will parse and validate the reference, and clean tags when // applicable tags are only cleaned when plus (+) signs are present, and are // converted to underscores (_) before pushing // See https://github.com/helm/helm/issues/10166 -func parseReference(raw string) (registry.Reference, error) { +func ParseReference(raw string) (registry.Reference, error) { // The sole possible reference modification is replacing plus (+) signs // present in tags with underscores (_). To do this properly, we first // need to identify a tag, and then pass it on to the reference parser