Do not pass by composed struct

It useless to use the composed struct field as the current "object" is
composed by this one. Get Name field directly. (Thanks staticcheck)
This commit is contained in:
2024-04-05 07:58:37 +02:00
parent 441b30a570
commit 984b50356a

View File

@@ -236,7 +236,7 @@ func (d *Deployment) AddVolumes(service types.ServiceConfig, appName string) {
VolumeSource: corev1.VolumeSource{ VolumeSource: corev1.VolumeSource{
ConfigMap: &corev1.ConfigMapVolumeSource{ ConfigMap: &corev1.ConfigMapVolumeSource{
LocalObjectReference: corev1.LocalObjectReference{ LocalObjectReference: corev1.LocalObjectReference{
Name: cm.ObjectMeta.Name, Name: cm.Name,
}, },
}, },
}, },
@@ -268,7 +268,7 @@ func (d *Deployment) AddVolumes(service types.ServiceConfig, appName string) {
VolumeSource: corev1.VolumeSource{ VolumeSource: corev1.VolumeSource{
ConfigMap: &corev1.ConfigMapVolumeSource{ ConfigMap: &corev1.ConfigMapVolumeSource{
LocalObjectReference: corev1.LocalObjectReference{ LocalObjectReference: corev1.LocalObjectReference{
Name: cm.ObjectMeta.Name, Name: cm.Name,
}, },
}, },
}, },