[英]Use url.URL with controller-gen
I'm trying to develop a custom resource on kube.netes with kubebuilder.我正在尝试使用 kubebuilder 在 kube.netes 上开发自定义资源。 In this CR, I have a field of type
url.URL
在此 CR 中,我有一个类型为
url.URL
的字段
I get this error:我收到此错误:
(*in).DeepCopyInto undefined (type *url.URL has no field or method DeepCopyInto)
Is there a way to work with type url.URL
when developing a CR?在开发 CR 时,有没有办法使用类型
url.URL
?
Thanks谢谢
So I found a solution所以我找到了解决方案
I don't know if it's the best but I've created a custom type URL with the part which is missing to use net/url
with controller-gen
.我不知道它是否是最好的,但我创建了一个自定义类型 URL ,其中缺少将
net/url
与controller-gen
一起使用的部分。
It works fine https://gist.github.com/quentinalbertone/ec00085b57992d836c08d4586295ace7它工作正常https://gist.github.com/quentinalbertone/ec00085b57992d836c08d4586295ace7
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.