items needs to be an allocatable array. It is reallocated on assignment to a constructor containing the elements from the start of the array to i-1 and from j to the end.
copy(items[i:], items[j:])
for k, n := len(items)-j+i, len(items); k < n; k++ {
items[k] = nil
}
items = items[:len(items)-j+i]
Use this when the elements of items have a pointer type.
The for loop sets unused memory to nil, to avoid a memory leak.