From 6e14fa95a137cde1dbb6762215f40d98eff643c4 Mon Sep 17 00:00:00 2001 From: RamiBerm Date: Thu, 15 Jul 2021 09:16:01 +0300 Subject: [PATCH] Update tap.go and go.sum --- cli/cmd/tap.go | 9 +++++---- cli/go.sum | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/cli/cmd/tap.go b/cli/cmd/tap.go index 18c057b54..46cb4b69e 100644 --- a/cli/cmd/tap.go +++ b/cli/cmd/tap.go @@ -3,13 +3,13 @@ package cmd import ( "errors" "fmt" + "github.com/spf13/cobra" "github.com/up9inc/mizu/cli/mizu" "github.com/up9inc/mizu/cli/uiUtils" + "github.com/up9inc/mizu/shared/units" "os" "regexp" "strings" - "github.com/up9inc/mizu/shared/units" - "github.com/spf13/cobra" ) type MizuTapOptions struct { @@ -60,8 +60,9 @@ Supported protocols are HTTP and gRPC.`, return errors.New(fmt.Sprintf("%s is not a valid regex %s", args[0], compileErr)) } - mizuTapOptions.MaxEntriesDBSizeBytes, err = units.HumanReadableToBytes(humanMaxEntriesDBSize) - if err != nil { + var parseHumanDataSizeErr error + mizuTapOptions.MaxEntriesDBSizeBytes, parseHumanDataSizeErr = units.HumanReadableToBytes(humanMaxEntriesDBSize) + if parseHumanDataSizeErr != nil { return errors.New(fmt.Sprintf("Could not parse --max-entries-db-size value %s", humanMaxEntriesDBSize)) } else if cmd.Flags().Changed(maxEntriesDBSizeFlagName) { // We're parsing human readable file sizes here so its best to be unambiguous diff --git a/cli/go.sum b/cli/go.sum index f26ffa68e..9a79ea6a5 100644 --- a/cli/go.sum +++ b/cli/go.sum @@ -90,6 +90,7 @@ github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZm github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc=