From 4dc58448a001f33d89f47bb443c31a4c57c27266 Mon Sep 17 00:00:00 2001
From: Adam Reese <adam@reese.io>
Date: Fri, 26 Feb 2016 16:56:09 -0800
Subject: [PATCH] ref(*) move lib code into pkg

---
 Makefile                                 | 6 +++---
 cmd/helm/chart_upload.go                 | 2 +-
 cmd/helm/delete.go                       | 2 +-
 cmd/helm/dm.go                           | 6 +++---
 cmd/helm/doctor.go                       | 6 +++---
 cmd/helm/get.go                          | 2 +-
 cmd/helm/helm.go                         | 4 ++--
 cmd/helm/list.go                         | 2 +-
 cmd/helm/pack.go                         | 2 +-
 cmd/helm/target.go                       | 4 ++--
 {dm => pkg/dm}/client.go                 | 0
 {dm => pkg/dm}/client_test.go            | 0
 {dm => pkg/dm}/install.go                | 4 ++--
 {dm => pkg/dm}/transport.go              | 0
 {dm => pkg/dm}/transport_test.go         | 0
 {dm => pkg/dm}/uninstall.go              | 2 +-
 {format => pkg/format}/messages.go       | 0
 {kubectl => pkg/kubectl}/cluster_info.go | 0
 {kubectl => pkg/kubectl}/command.go      | 0
 {kubectl => pkg/kubectl}/create.go       | 0
 {kubectl => pkg/kubectl}/create_test.go  | 0
 {kubectl => pkg/kubectl}/delete.go       | 0
 {kubectl => pkg/kubectl}/get.go          | 0
 {kubectl => pkg/kubectl}/get_test.go     | 0
 {kubectl => pkg/kubectl}/kubectl.go      | 0
 {kubectl => pkg/kubectl}/kubectl_test.go | 0
 26 files changed, 21 insertions(+), 21 deletions(-)
 rename {dm => pkg/dm}/client.go (100%)
 rename {dm => pkg/dm}/client_test.go (100%)
 rename {dm => pkg/dm}/install.go (98%)
 rename {dm => pkg/dm}/transport.go (100%)
 rename {dm => pkg/dm}/transport_test.go (100%)
 rename {dm => pkg/dm}/uninstall.go (88%)
 rename {format => pkg/format}/messages.go (100%)
 rename {kubectl => pkg/kubectl}/cluster_info.go (100%)
 rename {kubectl => pkg/kubectl}/command.go (100%)
 rename {kubectl => pkg/kubectl}/create.go (100%)
 rename {kubectl => pkg/kubectl}/create_test.go (100%)
 rename {kubectl => pkg/kubectl}/delete.go (100%)
 rename {kubectl => pkg/kubectl}/get.go (100%)
 rename {kubectl => pkg/kubectl}/get_test.go (100%)
 rename {kubectl => pkg/kubectl}/kubectl.go (100%)
 rename {kubectl => pkg/kubectl}/kubectl_test.go (100%)

diff --git a/Makefile b/Makefile
index d1529767b..2ba3fa3c2 100644
--- a/Makefile
+++ b/Makefile
@@ -55,11 +55,11 @@ test-style:
 	@if [ $(shell gofmt -e -l -s $(GO_DIRS)) ]; then \
 		echo "gofmt check failed:"; gofmt -e -d -s $(GO_DIRS); exit 1; \
 	fi
-	@for i in . $(GO_DIRS); do \
+	@for i in $(GO_PKGS); do \
 		golint $$i; \
 	done
-	@for i in . $(GO_DIRS); do \
-		go vet github.com/deis/helm-dm/$$i; \
+	@for i in $(GO_DIRS); do \
+		go tool vet $$i; \
 	done
 
 .PHONY: bootstrap \
diff --git a/cmd/helm/chart_upload.go b/cmd/helm/chart_upload.go
index 5e5933af4..3c872f002 100644
--- a/cmd/helm/chart_upload.go
+++ b/cmd/helm/chart_upload.go
@@ -9,7 +9,7 @@ import (
 
 	"github.com/aokoli/goutils"
 	"github.com/codegangsta/cli"
-	"github.com/deis/helm-dm/format"
+	"github.com/deis/helm-dm/pkg/format"
 	"github.com/kubernetes/deployment-manager/chart"
 )
 
diff --git a/cmd/helm/delete.go b/cmd/helm/delete.go
index 985d0ba5f..9cb21bf1e 100644
--- a/cmd/helm/delete.go
+++ b/cmd/helm/delete.go
@@ -4,7 +4,7 @@ import (
 	"errors"
 
 	"github.com/codegangsta/cli"
-	"github.com/deis/helm-dm/format"
+	"github.com/deis/helm-dm/pkg/format"
 )
 
 func init() {
diff --git a/cmd/helm/dm.go b/cmd/helm/dm.go
index 9419b3fe1..746459513 100644
--- a/cmd/helm/dm.go
+++ b/cmd/helm/dm.go
@@ -5,9 +5,9 @@ import (
 	"os"
 
 	"github.com/codegangsta/cli"
-	"github.com/deis/helm-dm/dm"
-	"github.com/deis/helm-dm/format"
-	"github.com/deis/helm-dm/kubectl"
+	"github.com/deis/helm-dm/pkg/dm"
+	"github.com/deis/helm-dm/pkg/format"
+	"github.com/deis/helm-dm/pkg/kubectl"
 )
 
 // ErrAlreadyInstalled indicates that DM is already installed.
diff --git a/cmd/helm/doctor.go b/cmd/helm/doctor.go
index 8568b6972..97812ccbc 100644
--- a/cmd/helm/doctor.go
+++ b/cmd/helm/doctor.go
@@ -2,9 +2,9 @@ package main
 
 import (
 	"github.com/codegangsta/cli"
-	"github.com/deis/helm-dm/dm"
-	"github.com/deis/helm-dm/format"
-	"github.com/deis/helm-dm/kubectl"
+	"github.com/deis/helm-dm/pkg/dm"
+	"github.com/deis/helm-dm/pkg/format"
+	"github.com/deis/helm-dm/pkg/kubectl"
 )
 
 func init() {
diff --git a/cmd/helm/get.go b/cmd/helm/get.go
index 7a9ffa9d5..b600e7515 100644
--- a/cmd/helm/get.go
+++ b/cmd/helm/get.go
@@ -4,7 +4,7 @@ import (
 	"errors"
 
 	"github.com/codegangsta/cli"
-	"github.com/deis/helm-dm/format"
+	"github.com/deis/helm-dm/pkg/format"
 )
 
 func init() {
diff --git a/cmd/helm/helm.go b/cmd/helm/helm.go
index 84ce287e0..a2f0cb753 100644
--- a/cmd/helm/helm.go
+++ b/cmd/helm/helm.go
@@ -4,8 +4,8 @@ import (
 	"os"
 
 	"github.com/codegangsta/cli"
-	"github.com/deis/helm-dm/dm"
-	"github.com/deis/helm-dm/format"
+	"github.com/deis/helm-dm/pkg/dm"
+	"github.com/deis/helm-dm/pkg/format"
 )
 
 var version = "0.0.1"
diff --git a/cmd/helm/list.go b/cmd/helm/list.go
index a3ea2f0df..2c1bc072c 100644
--- a/cmd/helm/list.go
+++ b/cmd/helm/list.go
@@ -2,7 +2,7 @@ package main
 
 import (
 	"github.com/codegangsta/cli"
-	"github.com/deis/helm-dm/format"
+	"github.com/deis/helm-dm/pkg/format"
 )
 
 func init() {
diff --git a/cmd/helm/pack.go b/cmd/helm/pack.go
index eeb612b84..44247b605 100644
--- a/cmd/helm/pack.go
+++ b/cmd/helm/pack.go
@@ -6,7 +6,7 @@ import (
 	"os"
 
 	"github.com/codegangsta/cli"
-	"github.com/deis/helm-dm/format"
+	"github.com/deis/helm-dm/pkg/format"
 	"github.com/kubernetes/deployment-manager/chart"
 )
 
diff --git a/cmd/helm/target.go b/cmd/helm/target.go
index cb06c8e77..b9906f87e 100644
--- a/cmd/helm/target.go
+++ b/cmd/helm/target.go
@@ -3,8 +3,8 @@ package main
 import (
 	"fmt"
 
-	"github.com/deis/helm-dm/format"
-	"github.com/deis/helm-dm/kubectl"
+	"github.com/deis/helm-dm/pkg/format"
+	"github.com/deis/helm-dm/pkg/kubectl"
 )
 
 func target(dryRun bool) error {
diff --git a/dm/client.go b/pkg/dm/client.go
similarity index 100%
rename from dm/client.go
rename to pkg/dm/client.go
diff --git a/dm/client_test.go b/pkg/dm/client_test.go
similarity index 100%
rename from dm/client_test.go
rename to pkg/dm/client_test.go
diff --git a/dm/install.go b/pkg/dm/install.go
similarity index 98%
rename from dm/install.go
rename to pkg/dm/install.go
index e1290b29d..0894f79c9 100644
--- a/dm/install.go
+++ b/pkg/dm/install.go
@@ -1,8 +1,8 @@
 package dm
 
 import (
-	"github.com/deis/helm-dm/format"
-	"github.com/deis/helm-dm/kubectl"
+	"github.com/deis/helm-dm/pkg/format"
+	"github.com/deis/helm-dm/pkg/kubectl"
 )
 
 // Install uses kubectl to install the base DM.
diff --git a/dm/transport.go b/pkg/dm/transport.go
similarity index 100%
rename from dm/transport.go
rename to pkg/dm/transport.go
diff --git a/dm/transport_test.go b/pkg/dm/transport_test.go
similarity index 100%
rename from dm/transport_test.go
rename to pkg/dm/transport_test.go
diff --git a/dm/uninstall.go b/pkg/dm/uninstall.go
similarity index 88%
rename from dm/uninstall.go
rename to pkg/dm/uninstall.go
index 4bd6b8c71..3aea10fbe 100644
--- a/dm/uninstall.go
+++ b/pkg/dm/uninstall.go
@@ -1,7 +1,7 @@
 package dm
 
 import (
-	"github.com/deis/helm-dm/kubectl"
+	"github.com/deis/helm-dm/pkg/kubectl"
 )
 
 // Uninstall uses kubectl to uninstall the base DM.
diff --git a/format/messages.go b/pkg/format/messages.go
similarity index 100%
rename from format/messages.go
rename to pkg/format/messages.go
diff --git a/kubectl/cluster_info.go b/pkg/kubectl/cluster_info.go
similarity index 100%
rename from kubectl/cluster_info.go
rename to pkg/kubectl/cluster_info.go
diff --git a/kubectl/command.go b/pkg/kubectl/command.go
similarity index 100%
rename from kubectl/command.go
rename to pkg/kubectl/command.go
diff --git a/kubectl/create.go b/pkg/kubectl/create.go
similarity index 100%
rename from kubectl/create.go
rename to pkg/kubectl/create.go
diff --git a/kubectl/create_test.go b/pkg/kubectl/create_test.go
similarity index 100%
rename from kubectl/create_test.go
rename to pkg/kubectl/create_test.go
diff --git a/kubectl/delete.go b/pkg/kubectl/delete.go
similarity index 100%
rename from kubectl/delete.go
rename to pkg/kubectl/delete.go
diff --git a/kubectl/get.go b/pkg/kubectl/get.go
similarity index 100%
rename from kubectl/get.go
rename to pkg/kubectl/get.go
diff --git a/kubectl/get_test.go b/pkg/kubectl/get_test.go
similarity index 100%
rename from kubectl/get_test.go
rename to pkg/kubectl/get_test.go
diff --git a/kubectl/kubectl.go b/pkg/kubectl/kubectl.go
similarity index 100%
rename from kubectl/kubectl.go
rename to pkg/kubectl/kubectl.go
diff --git a/kubectl/kubectl_test.go b/pkg/kubectl/kubectl_test.go
similarity index 100%
rename from kubectl/kubectl_test.go
rename to pkg/kubectl/kubectl_test.go
-- 
GitLab