gitlab.com/evatix-go/core@v1.3.55/coredata/stringslice/AnyItemsCloneIf.go (about)

     1  package stringslice
     2  
     3  func AnyItemsCloneIf(
     4  	isClone bool,
     5  	additionalCap int,
     6  	slice []interface{},
     7  ) (newSlice []interface{}) {
     8  	if slice == nil && !isClone {
     9  		return []interface{}{}
    10  	}
    11  
    12  	if !isClone {
    13  		return slice
    14  	}
    15  
    16  	return AnyItemsCloneUsingCap(additionalCap, slice)
    17  }