Initialize list as an empty slice
This commit is contained in:
parent
aed3f98703
commit
f2f4ded970
|
@ -28,7 +28,7 @@ const stringListDelim = `B780FFEC-B661-4EB8-9236-A01737AD98B6`
|
|||
func (sl StringList) Compact() StringList {
|
||||
parts := sl.Slice()
|
||||
|
||||
var newlist []string
|
||||
newlist := []string{}
|
||||
// drop the empty strings
|
||||
for i := range parts {
|
||||
if parts[i] != "" {
|
||||
|
|
Loading…
Reference in New Issue