From 73ba8fc3b806ecc1c3767826bb080df467980f40 Mon Sep 17 00:00:00 2001 From: Caj Larsson Date: Sat, 4 Jun 2022 17:17:26 +0800 Subject: [PATCH] Formatting with gofmt --- dataswamp/swamp_service.go | 6 +++++- infrastructure/system_time/clock.go | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-) 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{}