mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-30 15:15:07 +03:00
Accept some linter suggestions
This commit is contained in:
parent
55f8c7c042
commit
57cad7eabc
12 changed files with 42 additions and 60 deletions
|
@ -54,12 +54,11 @@ func (c *cancellation) Cancel(err error) error {
|
|||
defer c.mutex.Unlock()
|
||||
if c.done {
|
||||
return c.err
|
||||
} else {
|
||||
c.err = err
|
||||
c.done = true
|
||||
close(c.cancel)
|
||||
return nil
|
||||
}
|
||||
c.err = err
|
||||
c.done = true
|
||||
close(c.cancel)
|
||||
return nil
|
||||
}
|
||||
|
||||
// Error returns the error provided to Cancel, or nil if no error has been provided.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue