@@ -12,10 +12,10 @@ func TestPatchAndOptions(t *testing.T) {
1212 r := teapot .New ()
1313
1414 r .PATCH ("/resource" , func (w http.ResponseWriter , r * http.Request ) {
15- w .Write ([]byte ("PATCH" ))
15+ _ , _ = w .Write ([]byte ("PATCH" ))
1616 })
1717 r .OPTIONS ("/resource" , func (w http.ResponseWriter , r * http.Request ) {
18- w .Write ([]byte ("OPTIONS" ))
18+ _ , _ = w .Write ([]byte ("OPTIONS" ))
1919 })
2020
2121 assertEqual (t , request (t , r , "PATCH" , "/resource" ).Body .String (), "PATCH" )
@@ -27,11 +27,11 @@ func TestQueryPOST(t *testing.T) {
2727 r := teapot .New ()
2828
2929 r .QueryPOST ("/upload" , func (w http.ResponseWriter , r * http.Request ) {
30- w .Write ([]byte ("UPLOAD" ))
30+ _ , _ = w .Write ([]byte ("UPLOAD" ))
3131 }).Query ("uploads" )
3232
3333 r .QueryPOST ("/upload" , func (w http.ResponseWriter , r * http.Request ) {
34- w .Write ([]byte ("CREATE" ))
34+ _ , _ = w .Write ([]byte ("CREATE" ))
3535 })
3636
3737 assertEqual (t , request (t , r , "POST" , "/upload?uploads" ).Body .String (), "UPLOAD" )
@@ -43,11 +43,11 @@ func TestQueryPUT(t *testing.T) {
4343 r := teapot .New ()
4444
4545 r .QueryPUT ("/object" , func (w http.ResponseWriter , r * http.Request ) {
46- w .Write ([]byte ("ACL" ))
46+ _ , _ = w .Write ([]byte ("ACL" ))
4747 }).Query ("acl" )
4848
4949 r .QueryPUT ("/object" , func (w http.ResponseWriter , r * http.Request ) {
50- w .Write ([]byte ("PUT" ))
50+ _ , _ = w .Write ([]byte ("PUT" ))
5151 })
5252
5353 assertEqual (t , request (t , r , "PUT" , "/object?acl" ).Body .String (), "ACL" )
@@ -59,11 +59,11 @@ func TestQueryDELETE(t *testing.T) {
5959 r := teapot .New ()
6060
6161 r .QueryDELETE ("/object" , func (w http.ResponseWriter , r * http.Request ) {
62- w .Write ([]byte ("DELETE_ALL" ))
62+ _ , _ = w .Write ([]byte ("DELETE_ALL" ))
6363 }).Query ("deleteAll" )
6464
6565 r .QueryDELETE ("/object" , func (w http.ResponseWriter , r * http.Request ) {
66- w .Write ([]byte ("DELETE" ))
66+ _ , _ = w .Write ([]byte ("DELETE" ))
6767 })
6868
6969 assertEqual (t , request (t , r , "DELETE" , "/object?deleteAll" ).Body .String (), "DELETE_ALL" )
@@ -96,11 +96,11 @@ func TestQueryPATCH(t *testing.T) {
9696 r := teapot .New ()
9797
9898 r .QueryPATCH ("/resource" , func (w http.ResponseWriter , r * http.Request ) {
99- w .Write ([]byte ("PARTIAL" ))
99+ _ , _ = w .Write ([]byte ("PARTIAL" ))
100100 }).Query ("partial" )
101101
102102 r .QueryPATCH ("/resource" , func (w http.ResponseWriter , r * http.Request ) {
103- w .Write ([]byte ("PATCH" ))
103+ _ , _ = w .Write ([]byte ("PATCH" ))
104104 })
105105
106106 assertEqual (t , request (t , r , "PATCH" , "/resource?partial" ).Body .String (), "PARTIAL" )
@@ -133,7 +133,7 @@ func TestFinalizeAndIsFinalized(t *testing.T) {
133133 r := teapot .New ()
134134
135135 r .GET ("/test" , func (w http.ResponseWriter , r * http.Request ) {
136- w .Write ([]byte ("OK" ))
136+ _ , _ = w .Write ([]byte ("OK" ))
137137 })
138138
139139 // Initially not finalized
@@ -198,19 +198,19 @@ func TestQueryChaining(t *testing.T) {
198198 r := teapot .New ()
199199
200200 r .QueryGET ("/search" , func (w http.ResponseWriter , r * http.Request ) {
201- w .Write ([]byte ("FULL_ADMIN" ))
201+ _ , _ = w .Write ([]byte ("FULL_ADMIN" ))
202202 }).Query ("admin" ).QueryValue ("type" , "full" )
203203
204204 r .QueryGET ("/search" , func (w http.ResponseWriter , r * http.Request ) {
205- w .Write ([]byte ("ADMIN" ))
205+ _ , _ = w .Write ([]byte ("ADMIN" ))
206206 }).Query ("admin" )
207207
208208 r .QueryGET ("/search" , func (w http.ResponseWriter , r * http.Request ) {
209- w .Write ([]byte ("FULL" ))
209+ _ , _ = w .Write ([]byte ("FULL" ))
210210 }).QueryValue ("type" , "full" )
211211
212212 r .QueryGET ("/search" , func (w http.ResponseWriter , r * http.Request ) {
213- w .Write ([]byte ("DEFAULT" ))
213+ _ , _ = w .Write ([]byte ("DEFAULT" ))
214214 })
215215
216216 assertEqual (t , request (t , r , "GET" , "/search?admin&type=full" ).Body .String (), "FULL_ADMIN" )
0 commit comments