Simplify code

- Removed redundant returns
- Implicitly declare httptest.Server
This commit is contained in:
Christian Muehlhaeuser 2019-08-08 09:16:55 +00:00 committed by mattn
parent 24cdbe8c3d
commit 20bc690d8d
2 changed files with 1 additions and 5 deletions

View file

@ -14,8 +14,7 @@ import (
)
func TestCmdStream(t *testing.T) {
var ts *httptest.Server
ts = httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
if r.URL.Path != "/api/v1/streaming/public/local" {
http.Error(w, http.StatusText(http.StatusNotFound), http.StatusNotFound)
return