diff --git a/pkg/internal/error/configmaperror.go b/internal/kusterr/configmaperror.go similarity index 98% rename from pkg/internal/error/configmaperror.go rename to internal/kusterr/configmaperror.go index 1d60d78a2..af1264dc7 100644 --- a/pkg/internal/error/configmaperror.go +++ b/internal/kusterr/configmaperror.go @@ -15,7 +15,7 @@ limitations under the License. */ // Package error has contextual error types. -package error +package kusterr import "fmt" diff --git a/pkg/internal/error/configmaperror_test.go b/internal/kusterr/configmaperror_test.go similarity index 98% rename from pkg/internal/error/configmaperror_test.go rename to internal/kusterr/configmaperror_test.go index b98f65c55..d0a3a70fc 100644 --- a/pkg/internal/error/configmaperror_test.go +++ b/internal/kusterr/configmaperror_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package error +package kusterr import ( "strings" diff --git a/pkg/internal/error/patcherror.go b/internal/kusterr/patcherror.go similarity index 98% rename from pkg/internal/error/patcherror.go rename to internal/kusterr/patcherror.go index 60c9f80e5..b110e6085 100644 --- a/pkg/internal/error/patcherror.go +++ b/internal/kusterr/patcherror.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package error +package kusterr import ( "fmt" diff --git a/pkg/internal/error/patcherror_test.go b/internal/kusterr/patcherror_test.go similarity index 98% rename from pkg/internal/error/patcherror_test.go rename to internal/kusterr/patcherror_test.go index ac4a758b9..f5129eb7e 100644 --- a/pkg/internal/error/patcherror_test.go +++ b/internal/kusterr/patcherror_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package error +package kusterr import ( "strings" diff --git a/pkg/internal/error/resourceerror.go b/internal/kusterr/resourceerror.go similarity index 98% rename from pkg/internal/error/resourceerror.go rename to internal/kusterr/resourceerror.go index ef3566dd1..8701c9753 100644 --- a/pkg/internal/error/resourceerror.go +++ b/internal/kusterr/resourceerror.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package error +package kusterr import "fmt" diff --git a/pkg/internal/error/resourceerror_test.go b/internal/kusterr/resourceerror_test.go similarity index 98% rename from pkg/internal/error/resourceerror_test.go rename to internal/kusterr/resourceerror_test.go index ff7034cb7..62adbd487 100644 --- a/pkg/internal/error/resourceerror_test.go +++ b/internal/kusterr/resourceerror_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package error +package kusterr import ( "strings" diff --git a/pkg/internal/error/secreterror.go b/internal/kusterr/secreterror.go similarity index 98% rename from pkg/internal/error/secreterror.go rename to internal/kusterr/secreterror.go index cd72759ce..edf0be96d 100644 --- a/pkg/internal/error/secreterror.go +++ b/internal/kusterr/secreterror.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package error +package kusterr import "fmt" diff --git a/pkg/internal/error/secreterror_test.go b/internal/kusterr/secreterror_test.go similarity index 98% rename from pkg/internal/error/secreterror_test.go rename to internal/kusterr/secreterror_test.go index 9b9337403..05d9f279c 100644 --- a/pkg/internal/error/secreterror_test.go +++ b/internal/kusterr/secreterror_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package error +package kusterr import ( "strings" diff --git a/pkg/internal/error/yamlformaterror.go b/internal/kusterr/yamlformaterror.go similarity index 98% rename from pkg/internal/error/yamlformaterror.go rename to internal/kusterr/yamlformaterror.go index 4c27d30d7..74b5ef33f 100644 --- a/pkg/internal/error/yamlformaterror.go +++ b/internal/kusterr/yamlformaterror.go @@ -15,7 +15,7 @@ limitations under the License. */ // Package error has contextual error types. -package error +package kusterr import ( "fmt" diff --git a/pkg/internal/error/yamlformaterror_test.go b/internal/kusterr/yamlformaterror_test.go similarity index 99% rename from pkg/internal/error/yamlformaterror_test.go rename to internal/kusterr/yamlformaterror_test.go index fb56da406..2354d1ca8 100644 --- a/pkg/internal/error/yamlformaterror_test.go +++ b/internal/kusterr/yamlformaterror_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package error +package kusterr import ( "fmt" diff --git a/pkg/internal/loadertest/fakeloader.go b/internal/loadertest/fakeloader.go similarity index 100% rename from pkg/internal/loadertest/fakeloader.go rename to internal/loadertest/fakeloader.go diff --git a/pkg/patch/transformer/factory_test.go b/pkg/patch/transformer/factory_test.go index 126d9d517..cb8837890 100644 --- a/pkg/patch/transformer/factory_test.go +++ b/pkg/patch/transformer/factory_test.go @@ -22,9 +22,9 @@ import ( "testing" "gopkg.in/yaml.v2" + "sigs.k8s.io/kustomize/internal/loadertest" "sigs.k8s.io/kustomize/k8sdeps/kunstruct" "sigs.k8s.io/kustomize/pkg/gvk" - "sigs.k8s.io/kustomize/pkg/internal/loadertest" "sigs.k8s.io/kustomize/pkg/patch" "sigs.k8s.io/kustomize/pkg/resid" "sigs.k8s.io/kustomize/pkg/resmap" diff --git a/pkg/plugins/execplugin_test.go b/pkg/plugins/execplugin_test.go index 60a333a03..e5f423b13 100644 --- a/pkg/plugins/execplugin_test.go +++ b/pkg/plugins/execplugin_test.go @@ -17,9 +17,9 @@ import ( "strings" "testing" + "sigs.k8s.io/kustomize/internal/loadertest" "sigs.k8s.io/kustomize/k8sdeps/kunstruct" "sigs.k8s.io/kustomize/k8sdeps/kv/plugin" - "sigs.k8s.io/kustomize/pkg/internal/loadertest" "sigs.k8s.io/kustomize/pkg/resmap" "sigs.k8s.io/kustomize/pkg/resource" ) diff --git a/pkg/plugins/loader_test.go b/pkg/plugins/loader_test.go index d0e0177c8..f2faf9438 100644 --- a/pkg/plugins/loader_test.go +++ b/pkg/plugins/loader_test.go @@ -19,10 +19,10 @@ package plugins_test import ( "testing" + "sigs.k8s.io/kustomize/internal/loadertest" "sigs.k8s.io/kustomize/internal/plugintest" "sigs.k8s.io/kustomize/k8sdeps/kunstruct" "sigs.k8s.io/kustomize/k8sdeps/kv/plugin" - "sigs.k8s.io/kustomize/pkg/internal/loadertest" "sigs.k8s.io/kustomize/pkg/plugins" "sigs.k8s.io/kustomize/pkg/resmap" "sigs.k8s.io/kustomize/pkg/resource" diff --git a/pkg/resmap/factory.go b/pkg/resmap/factory.go index b178dbe53..e2a591258 100644 --- a/pkg/resmap/factory.go +++ b/pkg/resmap/factory.go @@ -20,8 +20,8 @@ import ( "fmt" "github.com/pkg/errors" + "sigs.k8s.io/kustomize/internal/kusterr" "sigs.k8s.io/kustomize/pkg/ifc" - internal "sigs.k8s.io/kustomize/pkg/internal/error" "sigs.k8s.io/kustomize/pkg/resource" "sigs.k8s.io/kustomize/pkg/types" ) @@ -50,7 +50,7 @@ func (rmF *Factory) FromFile( } res, err := rmF.NewResMapFromBytes(content) if err != nil { - return nil, internal.Handler(err, path) + return nil, kusterr.Handler(err, path) } return res, nil } diff --git a/pkg/resmap/factory_test.go b/pkg/resmap/factory_test.go index 30c9b6080..5054df2b1 100644 --- a/pkg/resmap/factory_test.go +++ b/pkg/resmap/factory_test.go @@ -22,10 +22,10 @@ import ( "reflect" "testing" + "sigs.k8s.io/kustomize/internal/loadertest" "sigs.k8s.io/kustomize/pkg/fs" "sigs.k8s.io/kustomize/pkg/gvk" "sigs.k8s.io/kustomize/pkg/ifc" - "sigs.k8s.io/kustomize/pkg/internal/loadertest" "sigs.k8s.io/kustomize/pkg/loader" "sigs.k8s.io/kustomize/pkg/resid" . "sigs.k8s.io/kustomize/pkg/resmap" diff --git a/pkg/resource/factory.go b/pkg/resource/factory.go index 9c6c2131d..f3543a8df 100644 --- a/pkg/resource/factory.go +++ b/pkg/resource/factory.go @@ -22,8 +22,8 @@ import ( "log" "strings" + "sigs.k8s.io/kustomize/internal/kusterr" "sigs.k8s.io/kustomize/pkg/ifc" - internal "sigs.k8s.io/kustomize/pkg/internal/error" "sigs.k8s.io/kustomize/pkg/patch" "sigs.k8s.io/kustomize/pkg/types" ) @@ -78,7 +78,7 @@ func (rf *Factory) SliceFromPatches( } res, err := rf.SliceFromBytes(content) if err != nil { - return nil, internal.Handler(err, string(path)) + return nil, kusterr.Handler(err, string(path)) } result = append(result, res...) } diff --git a/pkg/resource/factory_test.go b/pkg/resource/factory_test.go index 8d9af62a3..54875a3f7 100644 --- a/pkg/resource/factory_test.go +++ b/pkg/resource/factory_test.go @@ -20,7 +20,7 @@ import ( "reflect" "testing" - "sigs.k8s.io/kustomize/pkg/internal/loadertest" + "sigs.k8s.io/kustomize/internal/loadertest" "sigs.k8s.io/kustomize/pkg/patch" . "sigs.k8s.io/kustomize/pkg/resource" ) diff --git a/pkg/target/kusttarget_test.go b/pkg/target/kusttarget_test.go index 900e07600..627e9dc8f 100644 --- a/pkg/target/kusttarget_test.go +++ b/pkg/target/kusttarget_test.go @@ -23,9 +23,9 @@ import ( "strings" "testing" + "sigs.k8s.io/kustomize/internal/loadertest" "sigs.k8s.io/kustomize/pkg/gvk" "sigs.k8s.io/kustomize/pkg/ifc" - "sigs.k8s.io/kustomize/pkg/internal/loadertest" "sigs.k8s.io/kustomize/pkg/resid" "sigs.k8s.io/kustomize/pkg/resmap" "sigs.k8s.io/kustomize/pkg/resource" diff --git a/pkg/target/kusttestharness_test.go b/pkg/target/kusttestharness_test.go index 4fc5b729a..dc9ed1ed4 100644 --- a/pkg/target/kusttestharness_test.go +++ b/pkg/target/kusttestharness_test.go @@ -24,10 +24,10 @@ import ( "strings" "testing" + "sigs.k8s.io/kustomize/internal/loadertest" "sigs.k8s.io/kustomize/k8sdeps/kunstruct" "sigs.k8s.io/kustomize/k8sdeps/kv/plugin" "sigs.k8s.io/kustomize/k8sdeps/transformer" - "sigs.k8s.io/kustomize/pkg/internal/loadertest" "sigs.k8s.io/kustomize/pkg/loader" "sigs.k8s.io/kustomize/pkg/pgmconfig" "sigs.k8s.io/kustomize/pkg/plugins" diff --git a/pkg/transformers/config/factorycrd_test.go b/pkg/transformers/config/factorycrd_test.go index 18ed5d7f3..b7db200d3 100644 --- a/pkg/transformers/config/factorycrd_test.go +++ b/pkg/transformers/config/factorycrd_test.go @@ -20,9 +20,9 @@ import ( "reflect" "testing" + "sigs.k8s.io/kustomize/internal/loadertest" "sigs.k8s.io/kustomize/pkg/gvk" "sigs.k8s.io/kustomize/pkg/ifc" - "sigs.k8s.io/kustomize/pkg/internal/loadertest" ) // This defines two CRD's: Bee and MyKind.