From 2a0640f9f371f0347c6b822ac0eb83df7a84bba2 Mon Sep 17 00:00:00 2001 From: Vaibhav Kamra Date: Wed, 1 Feb 2023 19:35:34 -0800 Subject: [PATCH] [chore] Remove redundant module use (#2363) ## Description Standardize on `go-humanize` ## Does this PR need a docs update or release note? - [ ] :white_check_mark: Yes, it's included - [ ] :clock1: Yes, but in a later PR - [x] :no_entry: No ## Type of change - [ ] :sunflower: Feature - [ ] :bug: Bugfix - [ ] :world_map: Documentation - [ ] :robot: Test - [ ] :computer: CI/Deployment - [x] :broom: Tech Debt/Cleanup ## Issue(s) * #1038 ## Test Plan - [x] :muscle: Manual - [ ] :zap: Unit test - [ ] :green_heart: E2E --- src/go.mod | 1 - src/go.sum | 2 -- src/internal/connector/support/status.go | 4 ++-- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/go.mod b/src/go.mod index f947ed45a..481fd7fe2 100644 --- a/src/go.mod +++ b/src/go.mod @@ -71,7 +71,6 @@ require ( github.com/hashicorp/errwrap v1.0.0 // indirect github.com/hashicorp/golang-lru v0.5.4 // indirect github.com/inconshreveable/mousetrap v1.0.1 // indirect - github.com/inhies/go-bytesize v0.0.0-20220417184213-4913239db9cf github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/klauspost/compress v1.15.12 // indirect diff --git a/src/go.sum b/src/go.sum index 02f39a5a5..0befca54a 100644 --- a/src/go.sum +++ b/src/go.sum @@ -209,8 +209,6 @@ github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1: github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc= github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/inhies/go-bytesize v0.0.0-20220417184213-4913239db9cf h1:FtEj8sfIcaaBfAKrE1Cwb61YDtYq9JxChK1c7AKce7s= -github.com/inhies/go-bytesize v0.0.0-20220417184213-4913239db9cf/go.mod h1:yrqSXGoD/4EKfF26AOGzscPOgTTJcyAwM2rpixWT+t4= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= diff --git a/src/internal/connector/support/status.go b/src/internal/connector/support/status.go index 3f2435263..7e38758d3 100644 --- a/src/internal/connector/support/status.go +++ b/src/internal/connector/support/status.go @@ -4,8 +4,8 @@ import ( "context" "fmt" + "github.com/dustin/go-humanize" multierror "github.com/hashicorp/go-multierror" - bytesize "github.com/inhies/go-bytesize" "github.com/alcionai/corso/src/pkg/logger" ) @@ -142,7 +142,7 @@ func (cos *ConnectorOperationStatus) String() string { cos.lastOperation.String(), cos.Successful, cos.ObjectCount, - bytesize.New(float64(cos.bytes)), + humanize.Bytes(uint64(cos.bytes)), cos.FolderCount, )