mirror of
https://github.com/OpenListTeam/OpenList.git
synced 2025-09-20 04:36:09 +08:00

* Enable blank issue * chore(README.md): update docs (temporally) * Update FUNDING.yml * chore: purge README.md * chore: change module name to OpenListTeam/OpenList * fix: fix link errors * chore: remove v3 in module name * fix: resolve some conficts * fix: resolve conficts * docs: update with latest file --------- Co-authored-by: ShenLin <773933146@qq.com> Co-authored-by: Hantong Chen <cxwdyx620@gmail.com> Co-authored-by: joshua <i@joshua.su> Co-authored-by: Hantong Chen <70561268+cxw620@users.noreply.github.com>
23 lines
415 B
Go
23 lines
415 B
Go
package virtual
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/OpenListTeam/OpenList/internal/model"
|
|
"github.com/OpenListTeam/OpenList/pkg/utils/random"
|
|
)
|
|
|
|
func (d *Virtual) genObj(dir bool) model.Obj {
|
|
obj := &model.Object{
|
|
Name: random.String(10),
|
|
Size: 0,
|
|
IsFolder: true,
|
|
Modified: time.Now(),
|
|
}
|
|
if !dir {
|
|
obj.Size = random.RangeInt64(d.MinFileSize, d.MaxFileSize)
|
|
obj.IsFolder = false
|
|
}
|
|
return obj
|
|
}
|