File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed
Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change 77 - master
88
99jobs :
10+ lint :
11+ runs-on : ubuntu-latest
12+ steps :
13+ - name : Checkout
14+ uses : actions/checkout@v2
15+ - name : Lint Go Code
16+ run : make lint
1017 e2e-test :
1118 runs-on : ubuntu-latest
1219 steps :
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ type Tombstone struct {
2323 Graveyard string `json:"-"`
2424 Name string `json:"-"`
2525
26- fileLock sync.Mutex `json:"-"`
26+ fileLock sync.Mutex
2727}
2828
2929func (t * Tombstone ) Path () string {
@@ -64,7 +64,7 @@ func (t *Tombstone) RecordBirth() error {
6464 log .Printf ("Creating tombstone: %s\n " , t .Path ())
6565 err := t .Write ()
6666 if err != nil {
67- return fmt .Errorf ("failed to create tombstone: " , err )
67+ return fmt .Errorf ("failed to create tombstone: %v " , err )
6868 }
6969 return nil
7070}
@@ -78,15 +78,16 @@ func (t *Tombstone) RecordDeath(exitCode int) error {
7878 log .Printf ("Updating tombstone: %s\n " , t .Path ())
7979 err := t .Write ()
8080 if err != nil {
81- return fmt .Errorf ("failed to update tombstone: " , err )
81+ return fmt .Errorf ("failed to update tombstone: %v " , err )
8282 }
8383 return nil
8484}
8585
8686func (t * Tombstone ) String () string {
8787 inline , err := json .Marshal (t )
8888 if err != nil {
89- return fmt .Sprintf ("%+v" , t )
89+ log .Printf ("Error: failed to marshal tombstone as json: %v\n " , err )
90+ return "{}"
9091 }
9192 return string (inline )
9293}
You can’t perform that action at this time.
0 commit comments