diff --git a/dataswamp/swamp_service.go b/dataswamp/swamp_service.go index b1e5175..b638fa1 100644 --- a/dataswamp/swamp_service.go +++ b/dataswamp/swamp_service.go @@ -77,7 +77,11 @@ func (s DataSwampService) SaveFile(ref swampfile.FileReference, src io.Reader, s return swampfile.ErrContentSizeExceeded } - f.Close() + err = f.Close() + if err != nil { + panic(err) + } + s.eventBus.Handle(*util.NewEvent("FileRecieved", struct { Name string Size int64 diff --git a/infrastructure/system_time/clock.go b/infrastructure/system_time/clock.go index 1c414d5..90fe22c 100644 --- a/infrastructure/system_time/clock.go +++ b/infrastructure/system_time/clock.go @@ -1,6 +1,8 @@ package system_time -import "time" +import ( + "time" +) type Clock struct{}