mirror of
https://github.com/netbirdio/netbird.git
synced 2026-08-31 20:11:31 +02:00
nil,nil is no policy and no error. Allow it
This commit is contained in:
@@ -8,10 +8,7 @@ package mdm
|
||||
// Phase 5 / Phase 6. The stub keeps the package compilable for mobile
|
||||
// builds and returns (nil, nil) — the platform-absent sentinel that
|
||||
// LoadPolicy in policy.go treats as "no MDM source present".
|
||||
//
|
||||
// loadPlatformPolicy reports the absence of a platform-managed configuration on mobile builds.
|
||||
// It returns a nil policy map and a nil error as a sentinel value; the real managed-config
|
||||
// dictionary is read by the native iOS/Android layer and injected into the Go process.
|
||||
func loadPlatformPolicy() (map[string]any, error) {
|
||||
//nolint:nilnil // (nil, nil) is the documented platform-absent sentinel; see LoadPolicy.
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
@@ -8,9 +8,7 @@ package mdm
|
||||
// sentinel the caller (LoadPolicy in policy.go) treats as "no MDM
|
||||
// source present"; an error here would just translate to the same
|
||||
// outcome with an extra log line.
|
||||
//
|
||||
// loadPlatformPolicy indicates that no platform MDM policy is available on this build target.
|
||||
// It intentionally returns (nil, nil) as the documented platform-absent sentinel so callers treat MDM as not present.
|
||||
func loadPlatformPolicy() (map[string]any, error) {
|
||||
//nolint:nilnil // (nil, nil) is the documented platform-absent sentinel; see LoadPolicy.
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user