Skip to content

Commit

Permalink
Remove unused parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
belimawr committed Mar 20, 2024
1 parent 0ef8349 commit b732514
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions filebeat/input/filestream/input.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func (inp *filestream) Test(src loginp.Source, ctx input.TestContext) error {
return fmt.Errorf("not file source")
}

reader, _, err := inp.open(ctx.Logger, ctx.Cancelation, fs, 0, src)
reader, _, err := inp.open(ctx.Logger, ctx.Cancelation, fs, 0)
if err != nil {
return err
}
Expand All @@ -136,7 +136,7 @@ func (inp *filestream) Run(
log := ctx.Logger.With("path", fs.newPath).With("state-id", src.Name())
state := initState(log, cursor, fs)

r, truncated, err := inp.open(log, ctx.Cancelation, fs, state.Offset, src)
r, truncated, err := inp.open(log, ctx.Cancelation, fs, state.Offset)
if err != nil {
log.Errorf("File could not be opened for reading: %v", err)
return err
Expand Down Expand Up @@ -182,10 +182,9 @@ func (inp *filestream) open(
canceler input.Canceler,
fs fileSource,
offset int64,
src loginp.Source,
) (reader.Reader, bool, error) {

f, encoding, truncated, err := inp.openFile(log, fs.newPath, offset, src)
f, encoding, truncated, err := inp.openFile(log, fs.newPath, offset)
if err != nil {
return nil, truncated, err
}
Expand Down Expand Up @@ -264,7 +263,6 @@ func (inp *filestream) openFile(
log *logp.Logger,
path string,
offset int64,
src loginp.Source,
) (*os.File, encoding.Encoding, bool, error) {
fi, err := os.Stat(path)
if err != nil {
Expand Down

0 comments on commit b732514

Please sign in to comment.