From 64ae9e0462a3378e6581296fa3c663ba61d7f13f Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Mon, 24 Jul 2017 11:28:35 +0200 Subject: Split --- file/names.go | 6 +++--- file/names_test.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'file') diff --git a/file/names.go b/file/names.go index 11310b4..f893294 100644 --- a/file/names.go +++ b/file/names.go @@ -41,14 +41,14 @@ func SigName(msgFile string) string { return msgFile + extSig } -func PubFile(comment string) (string, bool) { +func PubFile(comment string) string { if strings.HasPrefix(comment, verifyWith) { file := comment[len(verifyWith):] if strings.HasSuffix(file, extPub) { - return FindFile(file), true + return FindFile(file) } } - return "", false + return "" } func VerifyWith(secFile string) string { diff --git a/file/names_test.go b/file/names_test.go index 7f6e089..a24faee 100644 --- a/file/names_test.go +++ b/file/names_test.go @@ -35,7 +35,7 @@ func TestVerify(t *testing.T) { } for _, tc := range testCases { t.Run(tc.comment, func(t *testing.T) { - file, _ := PubFile(tc.comment) + file := PubFile(tc.comment) if file != tc.file { t.Errorf("got %v, want %v", file, tc.file) } -- cgit v1.2.3