Replace utils.Once with stdlib sync.OnceValue

This commit is contained in:
Kovid Goyal
2023-08-09 12:08:42 +05:30
parent 49ea26968c
commit 4f72bb9894
22 changed files with 53 additions and 96 deletions

View File

@@ -11,6 +11,7 @@ import (
"kitty/tools/utils"
"regexp"
"strings"
"sync"
)
var _ = fmt.Print
@@ -25,7 +26,7 @@ type Entry struct {
type Container map[string]Entry
var Data = utils.Once(func() Container {
var Data = sync.OnceValue(func() Container {
tr := tar.NewReader(utils.ReaderForCompressedEmbeddedData(embedded_data))
ans := make(Container, 64)
for {