Source File
temp_store.go
Belonging Package
src.elv.sh/pkg/store
package storeimport ()// MustGetTempStore returns a Store backed by a temporary file, and a cleanup// function that should be called when the Store is no longer used.func () (DBStore, func()) {, := ioutil.TempFile("", "elvish.test")if != nil {panic(fmt.Sprintf("Failed to open temp file: %v", ))}, := NewStore(.Name())if != nil {panic(fmt.Sprintf("Failed to create Store instance: %v", ))}return , func() {.Close().Close()= os.Remove(.Name())if != nil {fmt.Fprintln(os.Stderr, "failed to remove temp file:", )}}}
The pages are generated with Golds v0.2.8-preview. (GOOS=darwin GOARCH=arm64)