From 8ee5c066b9dec78c98c47bd97ab639ff198bd0a5 Mon Sep 17 00:00:00 2001 From: PxyUp Date: Sat, 10 Feb 2024 00:35:05 +0100 Subject: [PATCH] lint --- pkg/notifier/telegram.go | 1 - pkg/parser/json_array_test.go | 4 ++-- pkg/parser/json_object_test.go | 5 +++-- pkg/parser/model_field_parser_test.go | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pkg/notifier/telegram.go b/pkg/notifier/telegram.go index b9cdd7f..8fa6330 100644 --- a/pkg/notifier/telegram.go +++ b/pkg/notifier/telegram.go @@ -15,7 +15,6 @@ type telegramBot struct { logger logger.Logger name string cfg *config.TelegramBotConfig - token string } func (t *telegramBot) notify(record *singleRecord, input builder.Interfacable) error { diff --git a/pkg/parser/json_array_test.go b/pkg/parser/json_array_test.go index b1aac23..892c78d 100644 --- a/pkg/parser/json_array_test.go +++ b/pkg/parser/json_array_test.go @@ -9,7 +9,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" - "io/ioutil" + "io" "os" "testing" ) @@ -29,7 +29,7 @@ func (s *JsonV2ArraySuite) SetupTest() { require.NoError(s.T(), err) defer jsonFile.Close() - jsonBody, err := ioutil.ReadAll(jsonFile) + jsonBody, err := io.ReadAll(jsonFile) if err != nil { require.NoError(s.T(), err) } diff --git a/pkg/parser/json_object_test.go b/pkg/parser/json_object_test.go index 9380ec7..cdc2fb4 100644 --- a/pkg/parser/json_object_test.go +++ b/pkg/parser/json_object_test.go @@ -8,7 +8,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" - "io/ioutil" + "io" + "os" "testing" ) @@ -28,7 +29,7 @@ func (s *JsonV2ObjectSuite) SetupTest() { require.NoError(s.T(), err) defer jsonFile.Close() - jsonBody, err := ioutil.ReadAll(jsonFile) + jsonBody, err := io.ReadAll(jsonFile) if err != nil { require.NoError(s.T(), err) } diff --git a/pkg/parser/model_field_parser_test.go b/pkg/parser/model_field_parser_test.go index da6f528..4816765 100644 --- a/pkg/parser/model_field_parser_test.go +++ b/pkg/parser/model_field_parser_test.go @@ -402,8 +402,8 @@ func (s *ModelFieldParserSuite) TestFileStorageField_Append() { resp, err = io.ReadAll(file) require.NoError(s.T(), err) require.NoError(s.T(), file.Close()) - assert.True(s.T(), bytes.Compare([]byte(`my_token -my_token`), resp) == 0) + assert.True(s.T(), bytes.Equal([]byte(`my_token +my_token`), resp)) } func (s *ModelFieldParserSuite) TestFileStorageField() {