barrel/build: Cleanup code

This commit is contained in:
Tom Wiesing 2022-12-05 14:03:26 +01:00
parent b86e6294de
commit e9b88b9991
No known key found for this signature in database

View file

@ -18,8 +18,7 @@ import (
// It also logs the current time into the metadata belonging to this instance.
func (barrel *Barrel) Build(ctx context.Context, progress io.Writer, start bool) error {
if !barrel.Locker.TryLock(ctx) {
err := locker.Locked
return err
return locker.Locked
}
defer barrel.Locker.Unlock(ctx)