Skip to content

Commit c1fc9a9

Browse files
belimawrrdner
andauthored
Fix error handling and add nolint comment (#41256)
--------- Co-authored-by: Denis <denis@rdner.de>
1 parent e2815a4 commit c1fc9a9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

filebeat/input/systemlogs/input.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ func useJournald(c *conf.C) (bool, error) {
119119

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

125125
if cfg.UseJournald {
@@ -159,7 +159,7 @@ func useJournald(c *conf.C) (bool, error) {
159159
return true, nil
160160
}
161161

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

0 commit comments

Comments
 (0)