Move WissKI Parts to new ingredients system
This commit is contained in:
parent
b5b1ce2340
commit
42b8cbd865
83 changed files with 1016 additions and 646 deletions
|
|
@ -3,6 +3,7 @@ package cmd
|
|||
import (
|
||||
wisski_distillery "github.com/FAU-CDI/wisski-distillery"
|
||||
"github.com/FAU-CDI/wisski-distillery/internal/cli"
|
||||
"github.com/FAU-CDI/wisski-distillery/internal/wisski/ingredient/locker"
|
||||
"github.com/tkw1536/goprogram/exit"
|
||||
)
|
||||
|
||||
|
|
@ -51,15 +52,15 @@ func (l instanceLock) Run(context wisski_distillery.Context) error {
|
|||
}
|
||||
|
||||
if l.Unlock {
|
||||
if !instance.Unlock() {
|
||||
if !instance.Locker().TryUnlock() {
|
||||
return errNotUnlock
|
||||
}
|
||||
context.Println("unlocked")
|
||||
return nil
|
||||
}
|
||||
|
||||
if err := instance.TryLock(); err != nil {
|
||||
return err
|
||||
if !instance.Locker().TryLock() {
|
||||
return locker.Locked
|
||||
}
|
||||
|
||||
context.Println("locked")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue