From 0767c7dcb96500ead5144a4757733d4bf366b387 Mon Sep 17 00:00:00 2001 From: Hu Keping Date: Wed, 27 May 2015 22:27:36 +0800 Subject: [PATCH] Remove unused code As far as I see, it's a dead code. Signed-off-by: Hu Keping Upstream-commit: a34cb321865c16ac42a12fe32fa3c8c4a5ffd263 Component: engine --- components/engine/integration-cli/utils.go | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/components/engine/integration-cli/utils.go b/components/engine/integration-cli/utils.go index f7ad61b0ac..edaa24c5e2 100644 --- a/components/engine/integration-cli/utils.go +++ b/components/engine/integration-cli/utils.go @@ -7,7 +7,6 @@ import ( "errors" "fmt" "io" - "net/http" "net/http/httptest" "os" "os/exec" @@ -275,26 +274,6 @@ type FileServer struct { *httptest.Server } -func fileServer(files map[string]string) (*FileServer, error) { - var handler http.HandlerFunc = func(w http.ResponseWriter, r *http.Request) { - if filePath, found := files[r.URL.Path]; found { - http.ServeFile(w, r, filePath) - } else { - http.Error(w, http.StatusText(404), 404) - } - } - - for _, file := range files { - if _, err := os.Stat(file); err != nil { - return nil, err - } - } - server := httptest.NewServer(handler) - return &FileServer{ - Server: server, - }, nil -} - // randomUnixTmpDirPath provides a temporary unix path with rand string appended. // does not create or checks if it exists. func randomUnixTmpDirPath(s string) string {