feat: add configurations for memory only, disk only, and memory & disk modes
All checks were successful
Release Tag / release (push) Successful in 14s
All checks were successful
Release Tag / release (push) Successful in 14s
This commit is contained in:
@@ -25,6 +25,10 @@ type MemoryFS struct {
|
||||
|
||||
// New creates a new MemoryFS.
|
||||
func New(capacity int64) *MemoryFS {
|
||||
if capacity <= 0 {
|
||||
panic("memory capacity must be greater than 0") // panic if the capacity is less than or equal to 0
|
||||
}
|
||||
|
||||
return &MemoryFS{
|
||||
files: make(map[string]*file),
|
||||
capacity: capacity,
|
||||
|
||||
Reference in New Issue
Block a user