@@ -34,7 +34,8 @@ type Loader struct {
34
34
}
35
35
36
36
func NewLoader (
37
- pc * types.PluginConfig , rf * resmap.Factory , fs filesys.FileSystem ) * Loader {
37
+ pc * types.PluginConfig , rf * resmap.Factory , fs filesys.FileSystem ,
38
+ ) * Loader {
38
39
return & Loader {pc : pc , rf : rf , fs : fs }
39
40
}
40
41
@@ -58,7 +59,8 @@ func (l *Loader) Config() *types.PluginConfig {
58
59
59
60
func (l * Loader ) LoadGenerators (
60
61
ldr ifc.Loader , v ifc.Validator , rm resmap.ResMap ) (
61
- result []* resmap.GeneratorWithProperties , err error ) {
62
+ result []* resmap.GeneratorWithProperties , err error ,
63
+ ) {
62
64
for _ , res := range rm .Resources () {
63
65
g , err := l .LoadGenerator (ldr , v , res )
64
66
if err != nil {
@@ -74,7 +76,8 @@ func (l *Loader) LoadGenerators(
74
76
}
75
77
76
78
func (l * Loader ) LoadGenerator (
77
- ldr ifc.Loader , v ifc.Validator , res * resource.Resource ) (resmap.Generator , error ) {
79
+ ldr ifc.Loader , v ifc.Validator , res * resource.Resource ,
80
+ ) (resmap.Generator , error ) {
78
81
c , err := l .loadAndConfigurePlugin (ldr , v , res )
79
82
if err != nil {
80
83
return nil , err
@@ -87,7 +90,8 @@ func (l *Loader) LoadGenerator(
87
90
}
88
91
89
92
func (l * Loader ) LoadTransformers (
90
- ldr ifc.Loader , v ifc.Validator , rm resmap.ResMap ) ([]* resmap.TransformerWithProperties , error ) {
93
+ ldr ifc.Loader , v ifc.Validator , rm resmap.ResMap ,
94
+ ) ([]* resmap.TransformerWithProperties , error ) {
91
95
var result []* resmap.TransformerWithProperties
92
96
for _ , res := range rm .Resources () {
93
97
t , err := l .LoadTransformer (ldr , v , res )
@@ -104,7 +108,8 @@ func (l *Loader) LoadTransformers(
104
108
}
105
109
106
110
func (l * Loader ) LoadTransformer (
107
- ldr ifc.Loader , v ifc.Validator , res * resource.Resource ) (* resmap.TransformerWithProperties , error ) {
111
+ ldr ifc.Loader , v ifc.Validator , res * resource.Resource ,
112
+ ) (* resmap.TransformerWithProperties , error ) {
108
113
c , err := l .loadAndConfigurePlugin (ldr , v , res )
109
114
if err != nil {
110
115
return nil , err
@@ -179,7 +184,8 @@ func isBuiltinPlugin(res *resource.Resource) bool {
179
184
func (l * Loader ) loadAndConfigurePlugin (
180
185
ldr ifc.Loader ,
181
186
v ifc.Validator ,
182
- res * resource.Resource ) (c resmap.Configurable , err error ) {
187
+ res * resource.Resource ,
188
+ ) (c resmap.Configurable , err error ) {
183
189
if isBuiltinPlugin (res ) {
184
190
switch l .pc .BpLoadingOptions {
185
191
case types .BploLoadFromFileSys :
@@ -192,7 +198,7 @@ func (l *Loader) loadAndConfigurePlugin(
192
198
c , err = l .makeBuiltinPlugin (res .GetGvk ())
193
199
default :
194
200
err = fmt .Errorf (
195
- "unknown plugin loader behavior specified: %v" ,
201
+ "unknown plugin loader behavior specified: %s %v" , res . GetGvk (). String () ,
196
202
l .pc .BpLoadingOptions )
197
203
}
198
204
} else {
@@ -282,4 +288,3 @@ func (l *Loader) loadExecOrGoPlugin(resId resid.ResId) (resmap.Configurable, err
282
288
}
283
289
return c , nil
284
290
}
285
-
0 commit comments