From fe231fa67a7cbe62fb400d303801b59633e97b7e Mon Sep 17 00:00:00 2001 From: Zack Scholl Date: Sun, 14 Jul 2019 19:31:44 -0700 Subject: [PATCH] remove machineid from deps --- go.mod | 1 - go.sum | 2 -- src/croc/croc.go | 14 +------------- 3 files changed, 1 insertion(+), 16 deletions(-) diff --git a/go.mod b/go.mod index 435a1492..64e91b88 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,6 @@ go 1.12 require ( github.com/OneOfOne/xxhash v1.2.5 // indirect github.com/cespare/xxhash v1.1.0 - github.com/denisbrodbeck/machineid v1.0.1 github.com/fatih/color v1.7.0 // indirect github.com/kalafut/imohash v1.0.0 github.com/mattn/go-colorable v0.1.2 // indirect diff --git a/go.sum b/go.sum index 824d377c..bf0333f4 100644 --- a/go.sum +++ b/go.sum @@ -7,8 +7,6 @@ github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghf github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/denisbrodbeck/machineid v1.0.1 h1:geKr9qtkB876mXguW2X6TU4ZynleN6ezuMSRhl4D7AQ= -github.com/denisbrodbeck/machineid v1.0.1/go.mod h1:dJUwb7PTidGDeYyUBmXZ2GphQBbjJCrnectwCyxcUSI= github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/kalafut/imohash v1.0.0 h1:LgCJ+p/BwM2HKpOxFopkeddpzVCfm15EtXMroXD1SYE= diff --git a/src/croc/croc.go b/src/croc/croc.go index 242094cf..ae4c6fce 100644 --- a/src/croc/croc.go +++ b/src/croc/croc.go @@ -17,7 +17,6 @@ import ( "sync" "time" - "github.com/denisbrodbeck/machineid" "github.com/pkg/errors" "github.com/schollz/croc/v6/src/comm" "github.com/schollz/croc/v6/src/compress" @@ -88,7 +87,6 @@ type Client struct { bar *progressbar.ProgressBar spinner *spinner.Spinner - machineID string firstSend bool mutex *sync.Mutex @@ -117,7 +115,6 @@ type RemoteFileRequest struct { } type SenderInfo struct { - MachineID string FilesToTransfer []FileInfo } @@ -216,15 +213,7 @@ func (c *Client) Send(options TransferOptions) (err error) { if len(c.FilesToTransfer) == 1 { fname = fmt.Sprintf("'%s'", c.FilesToTransfer[0].Name) } - machID, macIDerr := machineid.ID() - if macIDerr != nil { - log.Error(macIDerr) - return - } - if len(machID) > 6 { - machID = machID[:6] - } - c.machineID = machID + fmt.Fprintf(os.Stderr, "Sending %s (%s)\n", fname, utils.ByteCountDecimal(totalFilesSize)) fmt.Fprintf(os.Stderr, "Code is: %s\nOn the other computer run\n\ncroc %s\n", c.Options.SharedSecret, c.Options.SharedSecret) // // c.spinner.Suffix = " waiting for recipient..." @@ -641,7 +630,6 @@ func (c *Client) updateState() (err error) { if c.Options.IsSender && c.Step1ChannelSecured && !c.Step2FileInfoTransfered { var b []byte b, err = json.Marshal(SenderInfo{ - MachineID: c.machineID, FilesToTransfer: c.FilesToTransfer, }) if err != nil {