From 87d7509d00d7620d4f39bb862db6f7112b7076f8 Mon Sep 17 00:00:00 2001 From: eyedeekay Date: Thu, 14 Nov 2024 10:40:20 -0500 Subject: [PATCH] fix spelling errors --- client.go | 4 ++-- options.go | 10 +++++----- replyParser_test.go | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/client.go b/client.go index 4e49d44..c32b130 100644 --- a/client.go +++ b/client.go @@ -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), ) } diff --git a/options.go b/options.go index 52fd105..41855ca 100644 --- a/options.go +++ b/options.go @@ -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 { diff --git a/replyParser_test.go b/replyParser_test.go index b3d013e..fcb67bd 100644 --- a/replyParser_test.go +++ b/replyParser_test.go @@ -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 {