30 lines
510 B
Go
30 lines
510 B
Go
package internal
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
)
|
|
|
|
// FileStore loads and saves the state into a file
|
|
type FileStore struct {
|
|
file *os.File
|
|
}
|
|
|
|
func NewFileStore(filename string) (*FileStore, error) {
|
|
f, err := os.Open(filename)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &FileStore{
|
|
file: f,
|
|
}, nil
|
|
}
|
|
|
|
func (fs *FileStore) Load() (map[string]*FillerQueue, error) {
|
|
return nil, fmt.Errorf("not implemented")
|
|
}
|
|
|
|
func (fs *FileStore) Save(map[string]*FillerQueue) error {
|
|
return fmt.Errorf("not implemented")
|
|
}
|