mirror of
https://github.com/netbirdio/netbird.git
synced 2026-10-12 16:39:09 +02:00
Simply error surfacing
This commit is contained in:
@@ -25,6 +25,10 @@ func IsConsoleUser(id Identity) bool {
|
||||
return guardConsoleLookup(id, isConsoleUser)
|
||||
}
|
||||
|
||||
// consoleLookup is a variable so a test can decide whether a caller is at the
|
||||
// console without the machine running it having a seat of its own.
|
||||
var consoleLookup = IsConsoleUser
|
||||
|
||||
// guardConsoleLookup runs a platform lookup and turns a panic out of it into
|
||||
// "cannot confirm".
|
||||
func guardConsoleLookup(id Identity, lookup func(Identity) bool) (atConsole bool) {
|
||||
|
||||
Reference in New Issue
Block a user