Skip to content

Commit 1898d83

Browse files
authored
Merge pull request #406 from jessevdk/upgrade
Upgrade
2 parents b244016 + 01b0873 commit 1898d83

File tree

14 files changed

+170
-258
lines changed

14 files changed

+170
-258
lines changed

.github/workflows/go.yml

Lines changed: 15 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,35 +5,29 @@ name: Go
55

66
on:
77
push:
8-
branches: [ "master" ]
8+
branches: ["master"]
99
pull_request:
10-
branches: [ "master" ]
10+
branches: ["master"]
1111

1212
jobs:
13-
1413
build:
1514
runs-on: ubuntu-latest
1615
steps:
17-
- uses: actions/checkout@v4
18-
19-
- name: Set up Go
20-
uses: actions/setup-go@v4
21-
with:
22-
go-version: '1.20'
16+
- uses: actions/checkout@v4
2317

24-
- name: Build
25-
run: go build -v ./...
18+
- name: setup
19+
uses: actions/setup-go@v4
20+
with:
21+
go-version: "1.20"
2622

27-
- name: Install dependencies
28-
run: go get -v golang.org/x/lint/golint
23+
- name: build
24+
run: go build -v ./...
2925

30-
- name: Test
31-
run: go test -v ./...
26+
- name: test
27+
run: go test -v ./...
3228

33-
- name: Format
34-
run: exit $(gofmt -l . | wc -l)
29+
- name: gofmt
30+
run: exit $(gofmt -l . | wc -l)
3531

36-
- name: Linting
37-
run: |
38-
go tool vet -all=true -v=true . || true
39-
$(go env GOPATH | awk 'BEGIN{FS=":"} {print $1}')/bin/golint ./...
32+
- name: vet
33+
run: go vet -all=true -v=true .

.travis.yml

Lines changed: 0 additions & 43 deletions
This file was deleted.

completion.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,8 @@ func (c *completion) complete(args []string) []Completion {
188188
}
189189

190190
if argumentIsOption(arg) {
191-
prefix, optname, islong := stripOptionPrefix(arg)
192-
optname, _, argument := splitOption(prefix, optname, islong)
191+
_, optname, islong := stripOptionPrefix(arg)
192+
optname, _, argument := splitOption(optname, islong)
193193

194194
if argument == nil {
195195
var o *Option
@@ -250,7 +250,7 @@ func (c *completion) complete(args []string) []Completion {
250250
} else if argumentStartsOption(lastarg) {
251251
// Complete the option
252252
prefix, optname, islong := stripOptionPrefix(lastarg)
253-
optname, split, argument := splitOption(prefix, optname, islong)
253+
optname, split, argument := splitOption(optname, islong)
254254

255255
if argument == nil && !islong {
256256
rname, n := utf8.DecodeRuneInString(optname)

0 commit comments

Comments
 (0)