代码拉取完成,页面将自动刷新
package xlsx
import (
"os"
"path/filepath"
qt "github.com/frankban/quicktest"
)
// cleanTempDir removes all the temporary files from NewDiskVCellStore
func cleanTempDir(c *qt.C) {
tempDirBase := os.TempDir()
globPattern := tempDirBase + "/" + cellStorePrefix + "*"
dirs, err := filepath.Glob(globPattern)
if err != nil {
c.Logf("Cannot glob files of %s", globPattern)
c.FailNow()
}
for _, directory := range dirs {
if err = os.RemoveAll(directory); err != nil {
c.Logf("Cannot remove files of %s", directory)
c.FailNow()
}
}
}
// csRunC will run the given test function with all available
// CellStoreConstructors. You must take care of setting the
// CellStoreConstructors on the File struct or whereever else it is needed.
func csRunC(c *qt.C, description string, test func(c *qt.C, constructor CellStoreConstructor)) {
c.Run(description, func(c *qt.C) {
c.Run("MemoryCellStore", func(c *qt.C) {
c.Parallel()
test(c, NewMemoryCellStore)
})
c.Run("DiskVCellStore", func(c *qt.C) {
c.Parallel()
test(c, NewDiskVCellStore)
})
})
c.TB.Cleanup(func() {
if !c.Failed() {
cleanTempDir(c)
}
})
}
// csRunO will run the given test function with all available CellStore FileOptions, you must takes care of passing the FileOption to the appropriate method.
func csRunO(c *qt.C, description string, test func(c *qt.C, option FileOption)) {
c.Run(description, func(c *qt.C) {
c.Run("MemoryCellStore", func(c *qt.C) {
c.Parallel()
test(c, UseMemoryCellStore)
})
c.Run("DiskVCellStore", func(c *qt.C) {
c.Parallel()
test(c, UseDiskVCellStore)
})
})
c.TB.Cleanup(func() {
if !c.Failed() {
cleanTempDir(c)
}
})
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。