From b16240ded1268604124048cb702c2d8118144cf4 Mon Sep 17 00:00:00 2001 From: Manu NALEPA Date: Thu, 29 Feb 2024 18:15:40 +0100 Subject: [PATCH] helpers: Remove unused `initializeProgressBar` function. --- validator/helpers/BUILD.bazel | 2 -- validator/helpers/converts.go | 20 -------------------- 2 files changed, 22 deletions(-) diff --git a/validator/helpers/BUILD.bazel b/validator/helpers/BUILD.bazel index 1197e4f9246f..586b4ddf54dc 100644 --- a/validator/helpers/BUILD.bazel +++ b/validator/helpers/BUILD.bazel @@ -14,9 +14,7 @@ go_library( "//consensus-types/primitives:go_default_library", "//validator/db/iface:go_default_library", "//validator/slashing-protection-history/format:go_default_library", - "@com_github_k0kubun_go_ansi//:go_default_library", "@com_github_pkg_errors//:go_default_library", - "@com_github_schollz_progressbar_v3//:go_default_library", "@org_golang_google_grpc//:go_default_library", ], ) diff --git a/validator/helpers/converts.go b/validator/helpers/converts.go index d0573c4fddd5..e3fd965295d9 100644 --- a/validator/helpers/converts.go +++ b/validator/helpers/converts.go @@ -6,30 +6,10 @@ import ( "strconv" "strings" - "github.com/k0kubun/go-ansi" fieldparams "github.com/prysmaticlabs/prysm/v5/config/fieldparams" "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives" - "github.com/schollz/progressbar/v3" ) -func initializeProgressBar(numItems int, msg string) *progressbar.ProgressBar { - return progressbar.NewOptions( - numItems, - progressbar.OptionFullWidth(), - progressbar.OptionSetWriter(ansi.NewAnsiStdout()), - progressbar.OptionEnableColorCodes(true), - progressbar.OptionSetTheme(progressbar.Theme{ - Saucer: "[green]=[reset]", - SaucerHead: "[green]>[reset]", - SaucerPadding: " ", - BarStart: "[", - BarEnd: "]", - }), - progressbar.OptionOnCompletion(func() { fmt.Println() }), - progressbar.OptionSetDescription(msg), - ) -} - // Uint64FromString converts a string into a uint64 representation. func Uint64FromString(str string) (uint64, error) { return strconv.ParseUint(str, 10, 64)