func GetK8sDeploymentMetadata(clustername string, namespace string)([]v1.Deployment, error) {
deploymentMetadata, err:=clientset[clustername].AppsV1().Deployments(namespace).List(v1.ListOptions{})
return deploymentMetadata.Items , err
}
我有一个返回类型部署元数据的函数。我的[]v1.Deployment
问题是如何转换[]v1.Deployment
为[]string