mirror of
https://github.com/samber/lo.git
synced 2025-10-04 23:52:41 +08:00
lint: fix CI warnings and avoid named return parameters (#682)
This commit is contained in:
@@ -129,7 +129,7 @@ func Try(callback func() error) (ok bool) {
|
||||
ok = false
|
||||
}
|
||||
|
||||
return
|
||||
return ok
|
||||
}
|
||||
|
||||
// Try0 has the same behavior as Try, but callback returns no variable.
|
||||
@@ -327,7 +327,7 @@ func TryWithErrorValue(callback func() error) (errorValue any, ok bool) {
|
||||
errorValue = err
|
||||
}
|
||||
|
||||
return
|
||||
return errorValue, ok
|
||||
}
|
||||
|
||||
// TryCatch has the same behavior as Try, but calls the catch function in case of error.
|
||||
|
Reference in New Issue
Block a user