aboutsummaryrefslogtreecommitdiff
path: root/sig/sig.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2017-04-30 14:15:04 +0200
committerDimitri Sokolyuk <demon@dim13.org>2017-04-30 14:15:04 +0200
commit62edf30ea7b3985c8d76a0e06a0650e5f179014c (patch)
tree987a4d182eeff274c1029b6cf6c383aee2dc3ef9 /sig/sig.go
parentcf8716e54b78c18ef4bea649451e59c1772ed937 (diff)
...
Diffstat (limited to 'sig/sig.go')
-rw-r--r--sig/sig.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/sig/sig.go b/sig/sig.go
index 4e91336..b07a63b 100644
--- a/sig/sig.go
+++ b/sig/sig.go
@@ -67,3 +67,11 @@ func Decode(data []byte) (*Block, error) {
Message: message,
}, nil
}
+
+func DecodeFile(fname string) (*Block, error) {
+ body, err := ioutil.ReadFile(fname)
+ if err != nil {
+ return nil, err
+ }
+ return Decode(body)
+}