Skip to content

Commit

Permalink
interp: improve method signature
Browse files Browse the repository at this point in the history
this is a zero code changes. The signature was already the right one.
We are just using an alias, that will make things clearer.
  • Loading branch information
ccoVeille authored and mvdan committed Jan 3, 2025
1 parent a56e337 commit 5e4be79
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion interp/builtin.go
Original file line number Diff line number Diff line change
Expand Up @@ -902,7 +902,7 @@ func (r *Runner) builtinCode(ctx context.Context, pos syntax.Pos, name string, a

// mapfileSplit returns a suitable Split function for a [bufio.Scanner];
// the code is mostly stolen from [bufio.ScanLines].
func mapfileSplit(delim byte, dropDelim bool) func(data []byte, atEOF bool) (advance int, token []byte, err error) {
func mapfileSplit(delim byte, dropDelim bool) bufio.SplitFunc {
return func(data []byte, atEOF bool) (advance int, token []byte, err error) {
if atEOF && len(data) == 0 {
return 0, nil, nil
Expand Down

0 comments on commit 5e4be79

Please sign in to comment.