Skip to content

Commit

Permalink
Fix lint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Verseth committed Jul 1, 2023
1 parent 357106f commit a43e8c1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
go: ['1.18', '1.19', '1.20']
go: ['1.19', '1.20']
steps:
- name: Set up Go
uses: actions/setup-go@v2
Expand Down
4 changes: 1 addition & 3 deletions history.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ func (h *History) Add(input string) {
// Clear to clear the history.
func (h *History) Clear() {
h.tmp = make([]string, len(h.histories))
for i := range h.histories {
h.tmp[i] = h.histories[i]
}
copy(h.tmp, h.histories)
h.tmp = append(h.tmp, "")
h.selected = len(h.tmp) - 1
}
Expand Down
3 changes: 1 addition & 2 deletions input_posix.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ const maxReadBytes = 1024

// PosixParser is a ConsoleParser implementation for POSIX environment.
type PosixParser struct {
fd int
origTermios syscall.Termios
fd int
}

// Setup should be called before starting input
Expand Down

0 comments on commit a43e8c1

Please sign in to comment.