From 08ef5a968ebdd83dcc42998a96b6528837b55273 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Tue, 24 Jan 2017 13:50:52 -0800 Subject: [PATCH] Fix return values --- manifest/rfc2822.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manifest/rfc2822.go b/manifest/rfc2822.go index 5effa31..1046449 100644 --- a/manifest/rfc2822.go +++ b/manifest/rfc2822.go @@ -265,10 +265,10 @@ func Parse2822(readerIn io.Reader) (*Manifest2822, error) { } if !GitFetchRegex.MatchString(entry.GitFetch) { - return fmt.Errorf(`Tags %q has invalid GitFetch (must be "refs/heads/..." or "refs/tags/..."): %q`, entry.TagsString(), entry.GitFetch) + return nil, fmt.Errorf(`Tags %q has invalid GitFetch (must be "refs/heads/..." or "refs/tags/..."): %q`, entry.TagsString(), entry.GitFetch) } if !GitCommitRegex.MatchString(entry.GitCommit) { - return fmt.Errorf(`Tags %q has invalid GitCommit (must be a commit, not a tag or ref): %q`, entry.TagsString(), entry.GitCommit) + return nil, fmt.Errorf(`Tags %q has invalid GitCommit (must be a commit, not a tag or ref): %q`, entry.TagsString(), entry.GitCommit) } err = manifest.AddEntry(entry)