Skip to content

Commit

Permalink
address review comment
Browse files Browse the repository at this point in the history
  • Loading branch information
zak-pawel committed Dec 17, 2024
1 parent 1316fba commit 2cd8d9f
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 11 deletions.
4 changes: 0 additions & 4 deletions plugins/inputs/lvm/lvm.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ func (*LVM) SampleConfig() string {
return sampleConfig
}

func (*LVM) Init() error {
return nil
}

func (lvm *LVM) Gather(acc telegraf.Accumulator) error {
if err := lvm.gatherPhysicalVolumes(acc); err != nil {
return err
Expand Down
4 changes: 2 additions & 2 deletions plugins/inputs/monit/monit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import (
type transportMock struct {
}

func (*transportMock) RoundTrip(_ *http.Request) (*http.Response, error) {
errorString := "Get http://127.0.0.1:2812/_status?format=xml: " +
func (*transportMock) RoundTrip(*http.Request) (*http.Response, error) {
errorString := "get http://127.0.0.1:2812/_status?format=xml: " +
"read tcp 192.168.10.2:55610->127.0.0.1:2812: " +
"read: connection reset by peer"
return nil, errors.New(errorString)
Expand Down
6 changes: 3 additions & 3 deletions plugins/inputs/mqtt_consumer/mqtt_consumer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,15 @@ type fakeParser struct{}
// fakeParser satisfies telegraf.Parser
var _ telegraf.Parser = &fakeParser{}

func (*fakeParser) Parse(_ []byte) ([]telegraf.Metric, error) {
func (*fakeParser) Parse([]byte) ([]telegraf.Metric, error) {
panic("not implemented")
}

func (*fakeParser) ParseLine(_ string) (telegraf.Metric, error) {
func (*fakeParser) ParseLine(string) (telegraf.Metric, error) {
panic("not implemented")
}

func (*fakeParser) SetDefaultTags(_ map[string]string) {
func (*fakeParser) SetDefaultTags(map[string]string) {
panic("not implemented")
}

Expand Down
2 changes: 1 addition & 1 deletion plugins/inputs/phpfpm/fcgi_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ func (c *writeOnlyConn) Write(p []byte) (int, error) {
return len(p), nil
}

func (*writeOnlyConn) Read(_ []byte) (int, error) {
func (*writeOnlyConn) Read([]byte) (int, error) {
return 0, errors.New("conn is write-only")
}

Expand Down
2 changes: 1 addition & 1 deletion plugins/inputs/redis/redis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func (*testClient) Info() *redis.StringCmd {
return nil
}

func (*testClient) Do(_ string, _ ...interface{}) (interface{}, error) {
func (*testClient) Do(string, ...interface{}) (interface{}, error) {
return 2, nil
}

Expand Down

0 comments on commit 2cd8d9f

Please sign in to comment.