gofmt -s; fix misspellings and lint; Go 1.5.3 in Travis CI

This commit is contained in:
Matthew Holt
2016-02-14 00:10:57 -07:00
parent a11e14aca8
commit cae9f7de9c
16 changed files with 61 additions and 62 deletions

View File

@ -138,7 +138,7 @@ func (r Rule) parseAddress() (string, string) {
if strings.HasPrefix(r.Address, "tcp://") {
return "tcp", r.Address[len("tcp://"):]
}
// check if address has fastcgi scheme explicity set
// check if address has fastcgi scheme explicitly set
if strings.HasPrefix(r.Address, "fastcgi://") {
return "tcp", r.Address[len("fastcgi://"):]
}

View File

@ -35,20 +35,20 @@ func TestRuleParseAddress(t *testing.T) {
func TestBuildEnv(t *testing.T) {
buildEnvSingle := func(r *http.Request, rule Rule, fpath string, envExpected map[string]string, t *testing.T) {
h := Handler{}
env, err := h.buildEnv(r, rule, fpath)
if err != nil {
t.Error("Unexpected error:", err.Error())
}
for k, v := range envExpected {
if env[k] != v {
t.Errorf("Unexpected %v. Got %v, expected %v", k, env[k], v)
}
}
}
rule := Rule{}

View File

@ -39,9 +39,7 @@ const (
ipPort = "127.0.0.1:59000"
)
var (
t_ *testing.T
)
var globalt *testing.T
type FastCGIServer struct{}
@ -158,7 +156,7 @@ func sendFcgi(reqType int, fcgiParams map[string]string, data []byte, posts map[
time.Sleep(1 * time.Second)
if bytes.Index(content, []byte("FAILED")) >= 0 {
t_.Error("Server return failed message")
globalt.Error("Server return failed message")
}
return
@ -193,7 +191,7 @@ func generateRandFile(size int) (p string, m string) {
func DisabledTest(t *testing.T) {
// TODO: test chunked reader
t_ = t
globalt = t
rand.Seed(time.Now().UTC().UnixNano())