File tree 3 files changed +34
-1
lines changed
3 files changed +34
-1
lines changed Original file line number Diff line number Diff line change 1
- .PHONY : test
1
+ .PHONY : build test
2
2
3
3
MYPKG =$(shell go list ./... | grep -v /vendor/)
4
4
5
+ build :
6
+ go build $(MYPKG )
7
+
5
8
test :
6
9
go test $(MYPKG )
Original file line number Diff line number Diff line change
1
+ gots-dump
Original file line number Diff line number Diff line change
1
+ package main
2
+
3
+ import (
4
+ "flag"
5
+ "fmt"
6
+ "log"
7
+ "os"
8
+
9
+ "github.com/BlockchainSource/go-opentimestamps/opentimestamps"
10
+ )
11
+
12
+ func main () {
13
+ flag .Parse ()
14
+ path := flag .Arg (0 )
15
+ f , err := os .Open (path )
16
+ if err != nil {
17
+ log .Fatalf ("error opening file: %v" , err )
18
+ }
19
+
20
+ ts , err := opentimestamps .NewDetachedTimestampFile (f )
21
+ if err != nil {
22
+ log .Fatalf (
23
+ "error decoding detached timestamp %s: %v" ,
24
+ path , err ,
25
+ )
26
+ }
27
+
28
+ fmt .Println (ts .Dump ())
29
+ }
You can’t perform that action at this time.
0 commit comments