Skip to content

Commit 42fa074

Browse files
committed
Remove some dead code in web_test.go
1 parent 4692e21 commit 42fa074

File tree

1 file changed

+0
-39
lines changed

1 file changed

+0
-39
lines changed

web_test.go

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package web
22

33
import (
44
"bytes"
5-
"encoding/binary"
65
"encoding/json"
76
"errors"
87
"fmt"
@@ -126,22 +125,6 @@ type Test struct {
126125
expectedBody string
127126
}
128127

129-
type StructHandler struct {
130-
a string
131-
}
132-
133-
func (s *StructHandler) method() string {
134-
return s.a
135-
}
136-
137-
func (s *StructHandler) method2(ctx *Context) string {
138-
return s.a + ctx.Params["b"]
139-
}
140-
141-
func (s *StructHandler) method3(ctx *Context, b string) string {
142-
return s.a + b
143-
}
144-
145128
//initialize the routes
146129
func init() {
147130
mainServer.SetLogger(log.New(ioutil.Discard, "", 0))
@@ -464,28 +447,6 @@ func TestReadScgiRequest(t *testing.T) {
464447
}
465448
}
466449

467-
func buildFcgiKeyValue(key string, val string) []byte {
468-
var buf bytes.Buffer
469-
if len(key) <= 127 && len(val) <= 127 {
470-
data := struct {
471-
A uint8
472-
B uint8
473-
}{uint8(len(key)), uint8(len(val))}
474-
binary.Write(&buf, binary.BigEndian, data)
475-
} else if len(key) <= 127 && len(val) > 127 {
476-
data := struct {
477-
A uint8
478-
B uint32
479-
}{uint8(len(key)), uint32(len(val)) | 1<<31}
480-
481-
binary.Write(&buf, binary.BigEndian, data)
482-
}
483-
buf.WriteString(key)
484-
buf.WriteString(val)
485-
486-
return buf.Bytes()
487-
}
488-
489450
func makeCookie(vals map[string]string) []*http.Cookie {
490451
var cookies []*http.Cookie
491452
for k, v := range vals {

0 commit comments

Comments
 (0)