aboutsummaryrefslogtreecommitdiff
path: root/file
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2017-07-24 11:28:35 +0200
committerDimitri Sokolyuk <demon@dim13.org>2017-07-24 11:28:35 +0200
commit64ae9e0462a3378e6581296fa3c663ba61d7f13f (patch)
treead60d1650b3a4759cfd2b577ddbb733f58f7e31f /file
parent377fc867b7da33a4cfd865549efe2ec22a06ece4 (diff)
Split
Diffstat (limited to 'file')
-rw-r--r--file/names.go6
-rw-r--r--file/names_test.go2
2 files changed, 4 insertions, 4 deletions
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)
}