mirror of https://github.com/schollz/croc.git
remove machineid from deps
This commit is contained in:
parent
2e2700988b
commit
fe231fa67a
1
go.mod
1
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
|
||||
|
|
2
go.sum
2
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=
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue