fix spelling errors

This commit is contained in:
eyedeekay
2024-11-14 10:40:20 -05:00
parent 7b045bc60e
commit 87d7509d00
3 changed files with 8 additions and 8 deletions

View File

@ -56,7 +56,7 @@ type Client struct {
closeIdle bool
closeIdleTime uint
compression bool
compress bool
debug bool
mutex sync.Mutex
@ -280,7 +280,7 @@ func (c *Client) NewClient(id int32) (*Client, error) {
SetReduceIdleQuantity(c.reduceIdleQuantity),
SetCloseIdle(c.closeIdle),
SetCloseIdleTime(c.closeIdleTime),
SetCompression(c.compression),
SetCompression(c.compress),
setid(id),
)
}

View File

@ -372,7 +372,7 @@ func SetCloseIdleTime(u uint) func(*Client) error {
// SetCompression sets the tunnels to close after a specific amount of time
func SetCompression(b bool) func(*Client) error {
return func(c *Client) error {
c.compression = b
c.compress = b
return nil
}
}
@ -525,8 +525,8 @@ func (c *Client) reduceidlecount() string {
return fmt.Sprintf(" i2cp.reduceIdleQuantity=%d ", c.reduceIdleQuantity)
}
func (c *Client) compresion() string {
if c.compression {
func (c *Client) compression() string {
if c.compress {
return " i2cp.gzip=true "
}
return " i2cp.gzip=false "
@ -550,7 +550,7 @@ func (c *Client) allOptions() string {
c.reduceidlecount() +
c.closeonidle() +
c.closeidletime() +
c.compresion()
c.compression()
}
// Print return all options as string
@ -571,7 +571,7 @@ func (c *Client) Print() string {
c.reduceidlecount() +
c.closeonidle() +
c.closeidletime() +
c.compresion()
c.compression()
}
func (c *Client) getUser() string {

View File

@ -82,7 +82,7 @@ func TestParseReplyValidCases(t *testing.T) {
}
if len(parsed.Pairs) != len(tcase.Expected.Pairs) {
t.Fatalf("Wrong ammount of Pairs. Got %d expected 3", len(parsed.Pairs))
t.Fatalf("Wrong amount of Pairs. Got %d expected 3", len(parsed.Pairs))
}
for expK, expV := range tcase.Expected.Pairs {