From 31c8b1045369bb8490d937aaee93e354aafb2e4d Mon Sep 17 00:00:00 2001 From: Otto Sulin Date: Wed, 20 Jan 2021 14:59:15 +0200 Subject: [PATCH] Remove unneeded nil checks as in requested changes --- upup/pkg/fi/values.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/upup/pkg/fi/values.go b/upup/pkg/fi/values.go index 5d91105eb9..f2a8abc96a 100644 --- a/upup/pkg/fi/values.go +++ b/upup/pkg/fi/values.go @@ -32,9 +32,6 @@ func StringValue(s *string) string { //StringSliceValue takes a slice of string pointers and returns a slice of strings func StringSliceValue(stringSlice []*string) []string { - if stringSlice == nil { - return nil - } var newSlice []string for _, value := range stringSlice { if value != nil { @@ -59,9 +56,6 @@ func String(s string) *string { // StringSlice is a helper that builds a []*string from a slice of strings func StringSlice(stringSlice []string) []*string { - if stringSlice == nil { - return nil - } var newSlice []*string for i := range stringSlice { newSlice = append(newSlice, &stringSlice[i])