Skip to content

Commit

Permalink
cmd/utils: Remove redundant code
Browse files Browse the repository at this point in the history
The default split function for bufio.Scanner is bufio.ScanLines [1].
There's no need to explicitly set it.

Fallout from 6e53828

[1] https://pkg.go.dev/bufio#Scanner.Split

#1494
  • Loading branch information
debarshiray committed May 22, 2024
1 parent 8c0064a commit 8563cdf
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/cmd/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,6 @@ func askForConfirmationAsync(ctx context.Context,
logrus.Debug("Returned from /dev/stdin: POLLIN")

scanner := bufio.NewScanner(os.Stdin)
scanner.Split(bufio.ScanLines)

if !scanner.Scan() {
if err := scanner.Err(); err != nil {
return err
Expand Down

0 comments on commit 8563cdf

Please sign in to comment.