fixing ineffectual assignments

This commit is contained in:
Echsecutor 2016-09-01 14:43:05 +02:00
parent f15c59cc3d
commit 79760344e7
5 changed files with 5 additions and 5 deletions

View file

@ -300,7 +300,7 @@ func TestBrowseJson(t *testing.T) {
req.Header.Set("Accept", "application/json")
rec := httptest.NewRecorder()
code, err := b.ServeHTTP(rec, req)
code, _ := b.ServeHTTP(rec, req)
if code != http.StatusOK {
t.Fatalf("In test %d: Wrong status, expected %d, got %d", i, http.StatusOK, code)

View file

@ -545,7 +545,7 @@ func (c *FCGIClient) PostFile(p map[string]string, data url.Values, file map[str
if e != nil {
return nil, e
}
_, err = io.Copy(part, fd)
io.Copy(part, fd)
}
err = writer.Close()

View file

@ -103,7 +103,7 @@ func (fs FileServer) serveFile(w http.ResponseWriter, r *http.Request, name stri
defer ff.Close()
dd, err := ff.Stat()
if err == nil {
name = index
//name = index //ineffectual
d = dd
f = ff
break

View file

@ -162,7 +162,7 @@ func TestServeHTTP(t *testing.T) {
for i, test := range tests {
responseRecorder := httptest.NewRecorder()
request, err := http.NewRequest("GET", test.url, nil)
request, _ := http.NewRequest("GET", test.url, nil)
// prevent any URL sanitization within Go: we need unmodified paths here
if u, _ := url.Parse(test.url); u.RawPath != "" {
request.URL.Path = u.RawPath

View file

@ -55,7 +55,7 @@ var newACMEClient = func(config *Config, allowPrompts bool) (*ACMEClient, error)
if !strings.Contains(caURL, "://") {
caURL = "https://" + caURL
}
u, err := url.Parse(caURL)
u, _ := url.Parse(caURL)
if u.Scheme != "https" && !caddy.IsLoopback(u.Host) && !strings.HasPrefix(u.Host, "10.") {
return nil, fmt.Errorf("%s: insecure CA URL (HTTPS required)", caURL)
}