"vscode:/vscode.git/clone" did not exist on "c3921599c80f692ec478bcf742481ddaa313f6dc"
Unverified Commit 60cfa2a2 authored by 曹家巧's avatar 曹家巧 Committed by GitHub
Browse files

cache: fix comment function name in cache.go (#11110)

parent 55bbf3b4
...@@ -59,7 +59,7 @@ type DiskCache struct { ...@@ -59,7 +59,7 @@ type DiskCache struct {
testHookBeforeFinalWrite func(f *os.File) testHookBeforeFinalWrite func(f *os.File)
} }
// PutString is a convenience function for c.Put(d, strings.NewReader(s), int64(len(s))). // PutBytes is a convenience function for c.Put(d, strings.NewReader(s), int64(len(s))).
func PutBytes[S string | []byte](c *DiskCache, d Digest, data S) error { func PutBytes[S string | []byte](c *DiskCache, d Digest, data S) error {
return c.Put(d, bytes.NewReader([]byte(data)), int64(len(data))) return c.Put(d, bytes.NewReader([]byte(data)), int64(len(data)))
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment