fix golint issue

This commit is contained in:
Tan Jiang 2017-03-07 19:34:02 +08:00
parent d983982d19
commit 8ec94a6d0a
2 changed files with 3 additions and 1 deletions

View File

@ -9,7 +9,7 @@ import (
"testing" "testing"
) )
var endpoint string = "10.117.4.142" var endpoint = "10.117.4.142"
func TestMain(m *testing.M) { func TestMain(m *testing.M) {
notaryServer := notarytest.NewNotaryServer(endpoint) notaryServer := notarytest.NewNotaryServer(endpoint)

View File

@ -30,6 +30,8 @@ func currPath() string {
} }
return path.Dir(f) return path.Dir(f)
} }
// NewNotaryServer creates a notary server for testing.
func NewNotaryServer(endpoint string) *httptest.Server { func NewNotaryServer(endpoint string) *httptest.Server {
mux := http.NewServeMux() mux := http.NewServeMux()
validRoot := fmt.Sprintf("/v2/%s/notary-demo/busybox/_trust/tuf/", endpoint) validRoot := fmt.Sprintf("/v2/%s/notary-demo/busybox/_trust/tuf/", endpoint)