From 37556a52531e6fb87f74fcf35eff9055e2f84e7c Mon Sep 17 00:00:00 2001 From: Javad Date: Sat, 20 Jul 2024 16:25:15 +0330 Subject: [PATCH] fix: fmt and lint errors --- cmd/downlaod_mgr.go | 4 +--- cmd/gtk/startup_assistant.go | 3 ++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/cmd/downlaod_mgr.go b/cmd/downlaod_mgr.go index a3453f918..ebca0b56c 100644 --- a/cmd/downlaod_mgr.go +++ b/cmd/downlaod_mgr.go @@ -173,16 +173,14 @@ func (dl *DownloadManager) ExtractAndStoreFiles() error { _ = rc.Close() _ = outFile.Close() - } - _ = r.Close() } return nil } -func (dl *DownloadManager) ParseTime(dateString string) time.Time { +func (*DownloadManager) ParseTime(dateString string) time.Time { const layout = "2006-01-02T15:04:05.000000" parsedTime, err := time.Parse(layout, dateString) diff --git a/cmd/gtk/startup_assistant.go b/cmd/gtk/startup_assistant.go index dcbc75c2d..690166cbf 100644 --- a/cmd/gtk/startup_assistant.go +++ b/cmd/gtk/startup_assistant.go @@ -186,7 +186,8 @@ func startupAssistant(workingDir string, chain genesis.ChainType) bool { context.Background(), &md[snapshotIndex], func(fileName string, totalSize, downloaded int64, - totalItem, downloadedItem int, percentage float64) { + totalItem, downloadedItem int, percentage float64, + ) { percent := int(percentage) glib.IdleAdd(func() { dlMessage := fmt.Sprintf("🌐 Downloading %s (%d/%d)... %d%% (%s / %s)",