From 9258f3ed06e25f1770b9c2e5ed914bc5aa847307 Mon Sep 17 00:00:00 2001 From: maddalax Date: Fri, 4 Oct 2024 10:33:04 -0500 Subject: [PATCH] fixes --- cli/htmgo/internal/dirutil/dir.go | 2 +- cli/htmgo/tasks/astgen/entry.go | 2 +- cli/htmgo/tasks/astgen/map.go | 4 ++-- framework/internal/datastructure/map.go | 4 ++-- htmgo-site/internal/datastructures/map.go | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cli/htmgo/internal/dirutil/dir.go b/cli/htmgo/internal/dirutil/dir.go index 6817ac9..2715277 100644 --- a/cli/htmgo/internal/dirutil/dir.go +++ b/cli/htmgo/internal/dirutil/dir.go @@ -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) diff --git a/cli/htmgo/tasks/astgen/entry.go b/cli/htmgo/tasks/astgen/entry.go index 7b4d13b..e11ef0b 100644 --- a/cli/htmgo/tasks/astgen/entry.go +++ b/cli/htmgo/tasks/astgen/entry.go @@ -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)) diff --git a/cli/htmgo/tasks/astgen/map.go b/cli/htmgo/tasks/astgen/map.go index 73eb3e4..201ccea 100644 --- a/cli/htmgo/tasks/astgen/map.go +++ b/cli/htmgo/tasks/astgen/map.go @@ -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:]...) diff --git a/framework/internal/datastructure/map.go b/framework/internal/datastructure/map.go index 434c561..e4741d2 100644 --- a/framework/internal/datastructure/map.go +++ b/framework/internal/datastructure/map.go @@ -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:]...) diff --git a/htmgo-site/internal/datastructures/map.go b/htmgo-site/internal/datastructures/map.go index 0e016c3..533ca4f 100644 --- a/htmgo-site/internal/datastructures/map.go +++ b/htmgo-site/internal/datastructures/map.go @@ -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:]...)