Use stdlib maps/slices

This commit is contained in:
Kovid Goyal
2024-05-04 14:34:40 +05:30
parent 4998fe66b9
commit e1b367e1b3
27 changed files with 55 additions and 60 deletions

View File

@@ -13,6 +13,7 @@ import (
"io"
"io/fs"
"kitty"
"maps"
"net/url"
"os"
"os/exec"
@@ -21,6 +22,7 @@ import (
"path"
"path/filepath"
"regexp"
"slices"
"strconv"
"strings"
"time"
@@ -36,8 +38,6 @@ import (
"kitty/tools/utils/shlex"
"kitty/tools/utils/shm"
"golang.org/x/exp/maps"
"golang.org/x/exp/slices"
"golang.org/x/sys/unix"
)
@@ -411,7 +411,7 @@ func prepare_script(script string, replacements map[string]string) string {
if _, found := replacements["EXPORT_HOME_CMD"]; !found {
replacements["EXPORT_HOME_CMD"] = ""
}
keys := maps.Keys(replacements)
keys := utils.Keys(replacements)
for i, key := range keys {
keys[i] = "\\b" + key + "\\b"
}