WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Retire resource.CustomTemplate in favor of customTemplate $.
Calling a templating method on resources means that the resource object currently means that Resources need to be aware of template locations, filesystem considerations, and in the future `fs.FS` objects.
On the other hand if we move this to the `google` package, those "global" template functions will have a way to pass through `fs.FS` objects.
Before removing the `CustomTemplate` method from Resource and Type, I've also double-checked that our private overrides do not use these.
Note that I'm forced to change Resource.HasLabelsField and remove the pointer: without this I get a `F1205 17:17:34.717325 328294 template_data.go:335] error executing resource.go.tmpl for filepath ${override}/services/compute/resource_compute_address.go template: resource.go.tmpl:442:8: executing "resource.go.tmpl" at <customTemplate $ $.CustomCode.PostCreate false>: error calling customTemplate: template: labels.tmpl:1:8: executing "labels.tmpl" at <$.HasLabelsField>: can't evaluate field HasLabelsField in type api.Resource` error.
0 commit comments