-
Notifications
You must be signed in to change notification settings - Fork 51
Fix various linting issues and minor bugs #280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
20f9cb6
7427095
10b8a75
996232d
26a7753
b0b714c
7b3f988
89b3401
8375bfb
f5aded3
5500d15
d21c522
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -32,7 +32,6 @@ linters: | |
| disable-all: true | ||
| enable: | ||
| - bodyclose | ||
| - depguard | ||
| - dogsled | ||
| - errcheck | ||
| - errorlint | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -18,14 +18,14 @@ func (t *fakeT) Fatalf(format string, args ...interface{}) { | |||
| panic("exit wait on") | ||||
| } | ||||
|
|
||||
| func (t *fakeT) Log(args ...interface{}) {} | ||||
| func (t *fakeT) Log(...interface{}) {} | ||||
|
|
||||
| func (t *fakeT) Logf(format string, args ...interface{}) {} | ||||
| func (t *fakeT) Logf(string, ...interface{}) {} | ||||
|
Comment on lines
20
to
+23
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe you coule use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I kept Line 3 in 631f6c8
( There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I know 😬 but Go 1.18 is now not only old, but no longer supported There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yup, more than aware; I also know that it's not uncommon for companies to maintain an (internal) LTS version of older Go versions. Not all of those will be visible publicly on GitHub. (e.g. I know Google for a long time required compatibility with go1.13 for some of their systems - they maintained their own version for that). |
||||
|
|
||||
| func TestWaitOn(t *testing.T) { | ||||
| counter := 0 | ||||
| end := 4 | ||||
| check := func(t LogT) Result { | ||||
| check := func(LogT) Result { | ||||
| if counter == end { | ||||
| return Success() | ||||
| } | ||||
|
|
@@ -40,7 +40,7 @@ func TestWaitOn(t *testing.T) { | |||
| func TestWaitOnWithTimeout(t *testing.T) { | ||||
| fakeT := &fakeT{} | ||||
|
|
||||
| check := func(t LogT) Result { | ||||
| check := func(LogT) Result { | ||||
| return Continue("not done") | ||||
| } | ||||
|
|
||||
|
|
@@ -53,7 +53,7 @@ func TestWaitOnWithTimeout(t *testing.T) { | |||
| func TestWaitOnWithCheckTimeout(t *testing.T) { | ||||
| fakeT := &fakeT{} | ||||
|
|
||||
| check := func(t LogT) Result { | ||||
| check := func(LogT) Result { | ||||
| time.Sleep(1 * time.Second) | ||||
| return Continue("not done") | ||||
| } | ||||
|
|
@@ -65,7 +65,7 @@ func TestWaitOnWithCheckTimeout(t *testing.T) { | |||
| func TestWaitOnWithCheckError(t *testing.T) { | ||||
| fakeT := &fakeT{} | ||||
|
|
||||
| check := func(t LogT) Result { | ||||
| check := func(LogT) Result { | ||||
| return Error(fmt.Errorf("broke")) | ||||
| } | ||||
|
|
||||
|
|
@@ -76,7 +76,7 @@ func TestWaitOnWithCheckError(t *testing.T) { | |||
| func TestWaitOn_WithCompare(t *testing.T) { | ||||
| fakeT := &fakeT{} | ||||
|
|
||||
| check := func(t LogT) Result { | ||||
| check := func(LogT) Result { | ||||
| return Compare(cmp.Equal(3, 4)) | ||||
| } | ||||
|
|
||||
|
|
||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe you coule use
...anyinstead of...interface{}