From 1cd2f8c2fc7d42b74fc743c48b025caede9c0f06 Mon Sep 17 00:00:00 2001 From: kmetin Date: Mon, 6 Nov 2023 12:08:48 +0300 Subject: [PATCH] fix Yuce's PR comment --- base/commands/migration/estimate_stages.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/base/commands/migration/estimate_stages.go b/base/commands/migration/estimate_stages.go index b1a340ec..2c62a59f 100644 --- a/base/commands/migration/estimate_stages.go +++ b/base/commands/migration/estimate_stages.go @@ -146,11 +146,11 @@ func fetchEstimationResults(ctx context.Context, ci *hazelcast.ClientInternal, m if err != nil { return nil, err } - et, err := MsToSecs(estimatedTime.(serialization.JSON).String()) + et, err := msToSecs(estimatedTime.(serialization.JSON).String()) if err != nil { return nil, err } - es, err := BytesToMegabytes(estimatedSize.(serialization.JSON).String()) + es, err := bytesToMegabytes(estimatedSize.(serialization.JSON).String()) if err != nil { return nil, err } @@ -159,7 +159,7 @@ func fetchEstimationResults(ctx context.Context, ci *hazelcast.ClientInternal, m return nil, errors.New("no rows found") } -func BytesToMegabytes(bytesStr string) (string, error) { +func bytesToMegabytes(bytesStr string) (string, error) { bytes, err := strconv.ParseFloat(bytesStr, 64) if err != nil { return "", err @@ -168,7 +168,7 @@ func BytesToMegabytes(bytesStr string) (string, error) { return fmt.Sprintf("%.2f MBs", mb), nil } -func MsToSecs(ms string) (string, error) { +func msToSecs(ms string) (string, error) { milliseconds, err := strconv.ParseInt(ms, 10, 64) if err != nil { return "", err