Closed thisXYH closed 2 years ago
confd v0.16
2021-12-09T09:59:55+08:00 confd[618239]: INFO Backend set to etcd 2021-12-09T09:59:55+08:00 confd[618239]: INFO Starting confd 2021-12-09T09:59:55+08:00 confd[618239]: INFO Backend source(s) set to .....something..... 2021-12-09T09:59:55+08:00 confd[618239]: DEBUG Loading template resources from confdir /data/confd 2021-12-09T09:59:55+08:00 confd[618239]: DEBUG Found template: /data/confd/conf.d/confd.toml 2021-12-09T09:59:55+08:00 confd[618239]: DEBUG Loading template resource from /data/confd/conf.d/confd.toml 2021-12-09T09:59:55+08:00 confd[618239]: DEBUG Found template: /data/confd/conf.d/nginx.toml 2021-12-09T09:59:55+08:00 confd[618239]: DEBUG Loading template resource from /data/confd/conf.d/nginx.toml 2021-12-09T09:59:55+08:00 confd[618239]: FATAL empty src template
[template] src = "c.tmpl" ... ...
I saw this error being thrown on the confd/resource/template/resource.go 106 ,Why this content cannot be decode?
confd/resource/template/resource.go 106
I used the same struct to write a small demo, it is possible to read the value of src.
confd v0.16
log:
2021-12-09T09:59:55+08:00 confd[618239]: INFO Backend set to etcd 2021-12-09T09:59:55+08:00 confd[618239]: INFO Starting confd 2021-12-09T09:59:55+08:00 confd[618239]: INFO Backend source(s) set to .....something..... 2021-12-09T09:59:55+08:00 confd[618239]: DEBUG Loading template resources from confdir /data/confd 2021-12-09T09:59:55+08:00 confd[618239]: DEBUG Found template: /data/confd/conf.d/confd.toml 2021-12-09T09:59:55+08:00 confd[618239]: DEBUG Loading template resource from /data/confd/conf.d/confd.toml 2021-12-09T09:59:55+08:00 confd[618239]: DEBUG Found template: /data/confd/conf.d/nginx.toml 2021-12-09T09:59:55+08:00 confd[618239]: DEBUG Loading template resource from /data/confd/conf.d/nginx.toml 2021-12-09T09:59:55+08:00 confd[618239]: FATAL empty src template
nginx.toml content
[template] src = "c.tmpl" ... ...
summary
I saw this error being thrown on the
confd/resource/template/resource.go 106
,Why this content cannot be decode?