// CanLock checks if the command has the UID in it's locks list. This only // determines if the UID is in the Locks slice - not if it is or is not actually // locked. This is because we may have just added the lock and have not actually // tried locking or relocking yet. func (c *Command) CanLock(uid uid.UIDLocker) bool { for _, l := range c.Locks { if uid.IsAlso(l) { return true } } return false }