mirror of
https://github.com/schollz/croc.git
synced 2025-10-11 13:21:00 +02:00
chore(croc): remove redundant code
+ remove redundant return of func that does not return + remove func that is not used
This commit is contained in:
parent
9f54f2d08f
commit
e85ac9f8bf
2 changed files with 0 additions and 13 deletions
|
@ -23,7 +23,6 @@ import (
|
||||||
"github.com/schollz/pake/v2"
|
"github.com/schollz/pake/v2"
|
||||||
"github.com/schollz/peerdiscovery"
|
"github.com/schollz/peerdiscovery"
|
||||||
"github.com/schollz/progressbar/v3"
|
"github.com/schollz/progressbar/v3"
|
||||||
"github.com/schollz/spinner"
|
|
||||||
"github.com/tscholl2/siec"
|
"github.com/tscholl2/siec"
|
||||||
|
|
||||||
"github.com/schollz/croc/v8/src/comm"
|
"github.com/schollz/croc/v8/src/comm"
|
||||||
|
@ -99,7 +98,6 @@ type Client struct {
|
||||||
conn []*comm.Comm
|
conn []*comm.Comm
|
||||||
|
|
||||||
bar *progressbar.ProgressBar
|
bar *progressbar.ProgressBar
|
||||||
spinner *spinner.Spinner
|
|
||||||
longestFilename int
|
longestFilename int
|
||||||
firstSend bool
|
firstSend bool
|
||||||
|
|
||||||
|
@ -1366,8 +1364,6 @@ func (c *Client) receiveData(i int) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Client) sendData(i int) {
|
func (c *Client) sendData(i int) {
|
||||||
|
@ -1436,8 +1432,6 @@ func (c *Client) sendData(i int) {
|
||||||
c.bar.Add(n)
|
c.bar.Add(n)
|
||||||
c.TotalSent += int64(n)
|
c.TotalSent += int64(n)
|
||||||
// time.Sleep(100 * time.Millisecond)
|
// time.Sleep(100 * time.Millisecond)
|
||||||
} else {
|
|
||||||
// log.Debugf("skipping chunk %d", pos)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1451,5 +1445,4 @@ func (c *Client) sendData(i int) {
|
||||||
panic(errRead)
|
panic(errRead)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,12 +12,6 @@ import (
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
func must(err error) {
|
|
||||||
if err != nil {
|
|
||||||
panic(err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
log.SetLevel("trace")
|
log.SetLevel("trace")
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue