File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -68,14 +68,15 @@ func (a *Webhook) GetInput() (input.Input, error) {
68
68
a .Path = filepath .Join ("api" , a .Resource .Version ,
69
69
fmt .Sprintf ("%s_webhook.go" , strings .ToLower (a .Resource .Kind )))
70
70
}
71
+ webhookTemplate := WebhookTemplate
71
72
if a .Defaulting {
72
- WebhookTemplate = WebhookTemplate + DefaultingWebhookTemplate
73
+ webhookTemplate = webhookTemplate + DefaultingWebhookTemplate
73
74
}
74
75
if a .Validating {
75
- WebhookTemplate = WebhookTemplate + ValidatingWebhookTemplate
76
+ webhookTemplate = webhookTemplate + ValidatingWebhookTemplate
76
77
}
77
78
78
- a .TemplateBody = WebhookTemplate
79
+ a .TemplateBody = webhookTemplate
79
80
a .Input .IfExistsAction = input .Error
80
81
return a .Input , nil
81
82
}
@@ -85,7 +86,7 @@ func (g *Webhook) Validate() error {
85
86
return g .Resource .Validate ()
86
87
}
87
88
88
- var (
89
+ const (
89
90
WebhookTemplate = `{{ .Boilerplate }}
90
91
91
92
package {{ .Resource.Version }}
You can’t perform that action at this time.
0 commit comments