Skip to content

Commit

Permalink
Remove unnecessary cast
Browse files Browse the repository at this point in the history
  • Loading branch information
andyedwardsibm committed Jan 26, 2019
1 parent d8a8304 commit f2c8eaf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/core/hash.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func calculateConfigHash(children []configObject) (string, error) {
// getConfigMapData extracts all the relevant data from the ConfigMap, whether that is
// the whole ConfigMap or only the specified keys.
func getConfigMapData(child configObject) map[string]string {
cm := corev1.ConfigMap(*child.object.(*corev1.ConfigMap))
cm := *child.object.(*corev1.ConfigMap)
if child.allKeys {
return cm.Data
}
Expand All @@ -83,7 +83,7 @@ func getConfigMapData(child configObject) map[string]string {
// getSecretData extracts all the relevant data from the Secret, whether that is
// the whole Secret or only the specified keys.
func getSecretData(child configObject) map[string][]byte {
s := corev1.Secret(*child.object.(*corev1.Secret))
s := *child.object.(*corev1.Secret)
if child.allKeys {
return s.Data
}
Expand Down

0 comments on commit f2c8eaf

Please sign in to comment.