瀏覽代碼

Remove unused code

As far as I see, it's a dead code.

Signed-off-by: Hu Keping <hukeping@huawei.com>
Hu Keping 10 年之前
父節點
當前提交
a34cb32186
共有 1 個文件被更改,包括 0 次插入21 次删除
  1. 0 21
      integration-cli/utils.go

+ 0 - 21
integration-cli/utils.go

@@ -7,7 +7,6 @@ import (
 	"errors"
 	"errors"
 	"fmt"
 	"fmt"
 	"io"
 	"io"
-	"net/http"
 	"net/http/httptest"
 	"net/http/httptest"
 	"os"
 	"os"
 	"os/exec"
 	"os/exec"
@@ -275,26 +274,6 @@ type FileServer struct {
 	*httptest.Server
 	*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.
 // randomUnixTmpDirPath provides a temporary unix path with rand string appended.
 // does not create or checks if it exists.
 // does not create or checks if it exists.
 func randomUnixTmpDirPath(s string) string {
 func randomUnixTmpDirPath(s string) string {