fixes
This commit is contained in:
parent
e6af7a73d5
commit
9258f3ed06
5 changed files with 8 additions and 8 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
|
||||
|
|
|
|||
|
|
@ -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:]...)
|
||||
|
|
|
|||
|
|
@ -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:]...)
|
||||
|
|
|
|||
|
|
@ -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:]...)
|
||||
|
|
|
|||
Loading…
Reference in a new issue