Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
PxyUp committed Feb 9, 2024
1 parent c1132e8 commit 8ee5c06
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
1 change: 0 additions & 1 deletion pkg/notifier/telegram.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions pkg/parser/json_array_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand All @@ -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)
}
Expand Down
5 changes: 3 additions & 2 deletions pkg/parser/json_object_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand All @@ -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)
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/parser/model_field_parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 8ee5c06

Please sign in to comment.