mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-22 16:28:19 +02:00
Replace utils.Once with stdlib sync.OnceValue
This commit is contained in:
@@ -7,13 +7,14 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
var _ = fmt.Print
|
||||
|
||||
var DefaultExeSearchPaths = Once(func() []string {
|
||||
var DefaultExeSearchPaths = sync.OnceValue(func() []string {
|
||||
candidates := [...]string{"/usr/local/bin", "/opt/bin", "/opt/homebrew/bin", "/usr/bin", "/bin", "/usr/sbin", "/sbin"}
|
||||
ans := make([]string, 0, len(candidates))
|
||||
for _, x := range candidates {
|
||||
|
||||
Reference in New Issue
Block a user