You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: changelog.go
    path of file: ./repos/tracee/pkg/changelog
    
    the code of the file until where you have to start completion: package changelog

import (
	"time"

	"github.com/aquasecurity/tracee/pkg/logger"
)

type comparable interface {
	~int | ~flo
    
func (clv *Changelog[T]) setAt(value T, targetTime time.Time) {
	// If the timestamp is already set, update that value only.
	_, ok := clv.timestamps[targetTime]
	if ok {
		index := clv.findIndex(targetTime)
		if !clv.changes[index].timestamp.Equal(targetTime) { // sanity check only (time exists already)
			logger.Debugw("changelog internal error: timestamp mismatch")
			return
		}
		if clv.changes[index].value != value {
			logger.Debugw("changelog error: value mismatch for same timestamp")
		}
		clv.changes[index].value = value
		return
	}

	entry := item[T]{
		timestamp: targetTime,
		value:     value,
	}

	// Insert the new entry in the changelog, keeping the list sorted by timestamp.
	idx := clv.findIndex(entry.timestamp)
	clv.changes = append(clv.changes, item[T]{})
	copy(clv.changes[idx+1:], clv.changes[idx:])
	clv.changes[idx] = entry

	// Mark the timestamp as set.
	clv.timestamps[targetTime] = struct{}{}
}