func GetK8sDeploymentMetadata(clustername string, namespace string)([]v1.Deployment, error) {
deploymentMetadata, err:=clientset[clustername].AppsV1().Deployments(namespace).List(v1.ListOptions{})
return deploymentMetadata.Items , err
}
I have a function which returns metadata of deployment of type []v1.Deployment
.My question is how can i convert []v1.Deployment
to []string