mirror of
https://github.com/safing/portbase
synced 2026-05-01 21:21:23 +00:00
Clean up database package
This commit is contained in:
parent
ddc773a9f2
commit
7011bde0fe
7 changed files with 18 additions and 21 deletions
|
|
@ -30,12 +30,12 @@ type Controller struct {
|
|||
}
|
||||
|
||||
// newController creates a new controller for a storage.
|
||||
func newController(storageInt storage.Interface) (*Controller, error) {
|
||||
func newController(storageInt storage.Interface) *Controller {
|
||||
return &Controller{
|
||||
storage: storageInt,
|
||||
migrating: abool.NewBool(false),
|
||||
hibernating: abool.NewBool(false),
|
||||
}, nil
|
||||
}
|
||||
}
|
||||
|
||||
// ReadOnly returns whether the storage is read only.
|
||||
|
|
@ -221,7 +221,7 @@ func (c *Controller) MaintainThorough() error {
|
|||
|
||||
// Shutdown shuts down the storage.
|
||||
func (c *Controller) Shutdown() error {
|
||||
// aquire full locks
|
||||
// acquire full locks
|
||||
c.readLock.Lock()
|
||||
defer c.readLock.Unlock()
|
||||
c.writeLock.Lock()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue