Remove persistence again.

change-name
Robert Jacob 5 years ago
parent 6e6924a062
commit 2605583d2a
  1. 12
      storage.go

@ -9,21 +9,19 @@ import (
type Listener func(status SpaceStatus)
type Storage struct {
filePath string
persistent bool
status SpaceStatus
filePath string
status SpaceStatus
}
func Open(filePath string, persistent bool) (*Storage, error) {
func Open(filePath string) (*Storage, error) {
status, err := readFile(filePath)
if err != nil {
return nil, fmt.Errorf("error reading status: %s", err)
}
return &Storage{
filePath: filePath,
persistent: persistent,
status: *status,
filePath: filePath,
status: *status,
}, nil
}

Loading…
Cancel
Save