Skip to content

Commit

Permalink
Fix error handling and add nolint comment (#41256) (#41260)
Browse files Browse the repository at this point in the history
---------

Co-authored-by: Denis <denis@rdner.de>
(cherry picked from commit c1fc9a9)

Co-authored-by: Tiago Queiroz <tiago.queiroz@elastic.co>
  • Loading branch information
mergify[bot] and belimawr authored Oct 16, 2024
1 parent d50bd34 commit 9f760f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions filebeat/input/systemlogs/input.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ func useJournald(c *conf.C) (bool, error) {

cfg := config{}
if err := c.Unpack(&cfg); err != nil {
return false, nil
return false, fmt.Errorf("cannot unpack 'system-logs' config: %w", err)
}

if cfg.UseJournald {
Expand Down Expand Up @@ -159,7 +159,7 @@ func useJournald(c *conf.C) (bool, error) {
return true, nil
}

func toJournaldConfig(cfg *conf.C) (*conf.C, error) {
func toJournaldConfig(cfg *conf.C) (*conf.C, error) { //nolint:unused // It's used on Linux
newCfg, err := cfg.Child("journald", -1)
if err != nil {
return nil, fmt.Errorf("cannot extract 'journald' block: %w", err)
Expand Down

0 comments on commit 9f760f1

Please sign in to comment.