This commit is contained in:
maddalax 2024-10-04 10:33:04 -05:00
parent e6af7a73d5
commit 9258f3ed06
5 changed files with 8 additions and 8 deletions

View file

@ -71,7 +71,7 @@ func MoveFile(src, dst string) error {
if err != nil {
return fmt.Errorf("failed to copy file: %v", err)
}
// Disconnect the source file.
// Remove the source file.
err = os.Remove(src)
if err != nil {
return fmt.Errorf("failed to remove source file: %v", err)

View file

@ -53,7 +53,7 @@ func sliceCommonPrefix(dir1, dir2 string) string {
slicedDir1 := strings.TrimPrefix(dir1, commonPrefix)
slicedDir2 := strings.TrimPrefix(dir2, commonPrefix)
// Disconnect leading slashes
// Remove leading slashes
slicedDir1 = strings.TrimPrefix(slicedDir1, string(filepath.Separator))
slicedDir2 = strings.TrimPrefix(slicedDir2, string(filepath.Separator))

View file

@ -68,10 +68,10 @@ func (om *OrderedMap[K, V]) Values() []V {
// Delete removes a key-value pair from the OrderedMap.
func (om *OrderedMap[K, V]) Delete(key K) {
if _, exists := om.values[key]; exists {
// Disconnect the key from the map
// Remove the key from the map
delete(om.values, key)
// Disconnect the key from the keys slice
// Remove the key from the keys slice
for i, k := range om.keys {
if k == key {
om.keys = append(om.keys[:i], om.keys[i+1:]...)

View file

@ -70,10 +70,10 @@ func (om *OrderedMap[K, V]) Values() []V {
// Delete removes a key-value pair from the OrderedMap.
func (om *OrderedMap[K, V]) Delete(key K) {
if _, exists := om.values[key]; exists {
// Disconnect the key from the map
// Remove the key from the map
delete(om.values, key)
// Disconnect the key from the keys slice
// Remove the key from the keys slice
for i, k := range om.keys {
if k == key {
om.keys = append(om.keys[:i], om.keys[i+1:]...)

View file

@ -64,10 +64,10 @@ func (om *OrderedMap[K, V]) Values() []V {
// Delete removes a key-value pair from the OrderedMap.
func (om *OrderedMap[K, V]) Delete(key K) {
if _, exists := om.values[key]; exists {
// Disconnect the key from the map
// Remove the key from the map
delete(om.values, key)
// Disconnect the key from the keys slice
// Remove the key from the keys slice
for i, k := range om.keys {
if k == key {
om.keys = append(om.keys[:i], om.keys[i+1:]...)