mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-07-17 17:52:12 +00:00
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:
18
api/internal/localizer/errors.go
Normal file
18
api/internal/localizer/errors.go
Normal 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)
|
||||
}
|
||||
Reference in New Issue
Block a user