refactor: use maps.Copy and maps.Clone (#4518)
Some checks failed
CodeQL / Analyze (go) (push) Has been cancelled
build / build (push) Has been cancelled
Test fzf on macOS / build (push) Has been cancelled

Signed-off-by: mickychang9 <mickychang9@outlook.com>
This commit is contained in:
mickychang9
2025-09-29 17:11:19 +08:00
committed by GitHub
parent 9bdacc8df2
commit 760d1b7c58
3 changed files with 6 additions and 11 deletions

View File

@@ -3,6 +3,7 @@ package fzf
import (
"errors"
"fmt"
"maps"
"os"
"regexp"
"strconv"
@@ -2603,9 +2604,7 @@ func parseOptions(index *int, opts *Options, allArgs []string) error {
if err != nil {
return err
}
for k, v := range chords {
opts.Expect[k] = v
}
maps.Copy(opts.Expect, chords)
case "--no-expect":
opts.Expect = make(map[tui.Event]string)
case "--enabled", "--no-phony":