Skip to content

all: fix go vet warnings #133

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

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion http2/h2c/h2c_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func TestSettingsAckSwallowWriter(t *testing.T) {
var buf bytes.Buffer
swallower := newSettingsAckSwallowWriter(bufio.NewWriter(&buf))
fw := http2.NewFramer(swallower, nil)
fw.WriteSettings(http2.Setting{http2.SettingMaxFrameSize, 2})
fw.WriteSettings(http2.Setting{ID: http2.SettingMaxFrameSize, Val: 2})
fw.WriteSettingsAck()
fw.WriteData(1, true, []byte{})
swallower.Flush()
Expand Down
7 changes: 4 additions & 3 deletions http2/transport_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5307,14 +5307,16 @@ func TestTransportFrameBufferReuse(t *testing.T) {
defer wg.Done()
req, err := http.NewRequest("POST", st.ts.URL, strings.NewReader(filler))
if err != nil {
t.Fatal(err)
t.Error(err)
return
}
req.Header.Set("Big", filler)
req.Trailer = make(http.Header)
req.Trailer.Set("Big", filler)
res, err := tr.RoundTrip(req)
if err != nil {
t.Fatal(err)
t.Error(err)
return
}
if got, want := res.StatusCode, 200; got != want {
t.Errorf("StatusCode = %v; want %v", got, want)
Expand Down Expand Up @@ -5657,7 +5659,6 @@ func TestTransportRetriesOnStreamProtocolError(t *testing.T) {
}
}
}
return nil
}
ct.run()
}
Expand Down
18 changes: 9 additions & 9 deletions webdav/prop_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ func TestMemPS(t *testing.T) {
op: "allprop",
name: "/file",
pnames: []xml.Name{
{"DAV:", "resourcetype"},
{"foo", "bar"},
{Space: "DAV:", Local: "resourcetype"},
{Space: "foo", Local: "bar"},
},
wantPropstats: []Propstat{{
Status: http.StatusOK,
Expand Down Expand Up @@ -188,7 +188,7 @@ func TestMemPS(t *testing.T) {
propOp: []propOp{{
op: "propfind",
name: "/dir",
pnames: []xml.Name{{"DAV:", "resourcetype"}},
pnames: []xml.Name{{Space: "DAV:", Local: "resourcetype"}},
wantPropstats: []Propstat{{
Status: http.StatusOK,
Props: []Property{{
Expand All @@ -199,7 +199,7 @@ func TestMemPS(t *testing.T) {
}, {
op: "propfind",
name: "/file",
pnames: []xml.Name{{"DAV:", "resourcetype"}},
pnames: []xml.Name{{Space: "DAV:", Local: "resourcetype"}},
wantPropstats: []Propstat{{
Status: http.StatusOK,
Props: []Property{{
Expand All @@ -214,7 +214,7 @@ func TestMemPS(t *testing.T) {
propOp: []propOp{{
op: "propfind",
name: "/dir",
pnames: []xml.Name{{"DAV:", "getcontentlanguage"}},
pnames: []xml.Name{{Space: "DAV:", Local: "getcontentlanguage"}},
wantPropstats: []Propstat{{
Status: http.StatusNotFound,
Props: []Property{{
Expand All @@ -224,7 +224,7 @@ func TestMemPS(t *testing.T) {
}, {
op: "propfind",
name: "/dir",
pnames: []xml.Name{{"DAV:", "creationdate"}},
pnames: []xml.Name{{Space: "DAV:", Local: "creationdate"}},
wantPropstats: []Propstat{{
Status: http.StatusNotFound,
Props: []Property{{
Expand All @@ -238,7 +238,7 @@ func TestMemPS(t *testing.T) {
propOp: []propOp{{
op: "propfind",
name: "/dir",
pnames: []xml.Name{{"DAV:", "getetag"}},
pnames: []xml.Name{{Space: "DAV:", Local: "getetag"}},
wantPropstats: []Propstat{{
Status: http.StatusNotFound,
Props: []Property{{
Expand All @@ -248,7 +248,7 @@ func TestMemPS(t *testing.T) {
}, {
op: "propfind",
name: "/file",
pnames: []xml.Name{{"DAV:", "getetag"}},
pnames: []xml.Name{{Space: "DAV:", Local: "getetag"}},
wantPropstats: []Propstat{{
Status: http.StatusOK,
Props: []Property{{
Expand Down Expand Up @@ -493,7 +493,7 @@ func TestMemPS(t *testing.T) {
propOp: []propOp{{
op: "propfind",
name: "/dir",
pnames: []xml.Name{{"foo:", "bar"}},
pnames: []xml.Name{{Space: "foo:", Local: "bar"}},
wantPropstats: []Propstat{{
Status: http.StatusNotFound,
Props: []Property{{
Expand Down