Skip to content

Commit

Permalink
fix Yuce's PR comment
Browse files Browse the repository at this point in the history
  • Loading branch information
kutluhanmetin committed Nov 6, 2023
1 parent 0433098 commit 1cd2f8c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions base/commands/migration/estimate_stages.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 1cd2f8c

Please sign in to comment.