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)",