Load built-in plugins for kustomize localize (#4869)

* Load and filter built-in plugins

* Improve readability

* Process plugins as resources instead of bytes

* Throw error for validators

* Differentiate generators, transformers processing

* Enable validators

* add wrapper error
* improve documentation
This commit is contained in:
Anna Song
2022-11-28 13:23:42 -08:00
committed by GitHub
parent 0eff094faf
commit 832b552076
4 changed files with 344 additions and 9 deletions

View File

@@ -0,0 +1,18 @@
// Copyright 2022 The Kubernetes Authors.
// SPDX-License-Identifier: Apache-2.0
package localizer
import "fmt"
type ResourceLoadError struct {
InlineError error
FileError error
}
var _ error = ResourceLoadError{}
func (rle ResourceLoadError) Error() string {
return fmt.Sprintf(`when parsing as inline received error: %s
when parsing as filepath received error: %s`, rle.InlineError, rle.FileError)
}