mirror of
https://blitiri.com.ar/repos/chasquid
synced 2025-12-21 15:17:01 +00:00
Minor cleanups for staticcheck issues
staticcheck found a couple of minor code cleanup improvements, like unused variables or an out-of-order defer, mostly in tests. This patch fixes those problems by making the necessary adjustments. They're all fairly small, and should not change the logic in any significant way.
This commit is contained in:
@@ -22,10 +22,10 @@ func Hola(tr *trace.Trace, input url.Values) (url.Values, error) {
|
||||
return output, nil
|
||||
}
|
||||
|
||||
var testErr = errors.New("test error")
|
||||
var errTest = errors.New("test error")
|
||||
|
||||
func HolaErr(tr *trace.Trace, input url.Values) (url.Values, error) {
|
||||
return nil, testErr
|
||||
return nil, errTest
|
||||
}
|
||||
|
||||
type testServer struct {
|
||||
@@ -86,7 +86,7 @@ func TestEndToEnd(t *testing.T) {
|
||||
{"Echo", nil, mkV(), nil},
|
||||
{"Echo", mkV("msg", "hola"), mkV("msg", "hola"), nil},
|
||||
{"Hola", mkV("name", "marola"), mkV("greeting", "Hola marola"), nil},
|
||||
{"HolaErr", nil, nil, testErr},
|
||||
{"HolaErr", nil, nil, errTest},
|
||||
{"UnknownMethod", nil, nil, errUnknownMethod},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user