From f2bf9d0a42c5c44ebd7d2a857ce7253744f8d83d Mon Sep 17 00:00:00 2001 From: xichengliudui <1693291525@qq.com> Date: Tue, 12 Feb 2019 16:54:13 -0500 Subject: [PATCH] Use import () way Signed-off-by: xichengliudui <1693291525@qq.com> --- pkg/repo/repo_test.go | 10 ++++++---- pkg/urlutil/urlutil_test.go | 4 +++- pkg/version/compatible_test.go | 4 +++- pkg/version/version_test.go | 6 ++++-- 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/pkg/repo/repo_test.go b/pkg/repo/repo_test.go index 264e9bc3c..ce1951678 100644 --- a/pkg/repo/repo_test.go +++ b/pkg/repo/repo_test.go @@ -16,10 +16,12 @@ limitations under the License. package repo -import "testing" -import "io/ioutil" -import "os" -import "strings" +import ( + "testing" + "io/ioutil" + "os" + "strings" +) const testRepositoriesFile = "testdata/repositories.yaml" diff --git a/pkg/urlutil/urlutil_test.go b/pkg/urlutil/urlutil_test.go index b2af24e63..c3d8d3f89 100644 --- a/pkg/urlutil/urlutil_test.go +++ b/pkg/urlutil/urlutil_test.go @@ -16,7 +16,9 @@ limitations under the License. package urlutil -import "testing" +import ( + "testing" +) func TestUrlJoin(t *testing.T) { tests := []struct { diff --git a/pkg/version/compatible_test.go b/pkg/version/compatible_test.go index 7a3b23a7d..05bbee155 100644 --- a/pkg/version/compatible_test.go +++ b/pkg/version/compatible_test.go @@ -17,7 +17,9 @@ limitations under the License. // Package version represents the current version of the project. package version // import "k8s.io/helm/pkg/version" -import "testing" +import ( + "testing" +) func TestIsCompatible(t *testing.T) { tests := []struct { diff --git a/pkg/version/version_test.go b/pkg/version/version_test.go index eba573533..f8fe9b5f6 100644 --- a/pkg/version/version_test.go +++ b/pkg/version/version_test.go @@ -17,8 +17,10 @@ limitations under the License. // Package version represents the current version of the project. package version // import "k8s.io/helm/pkg/version" -import "testing" -import "k8s.io/helm/pkg/proto/hapi/version" +import ( + "testing" + "k8s.io/helm/pkg/proto/hapi/version" +) func TestGetVersionProto(t *testing.T) { tests := []struct {