📝 Add docstrings to mdm_integration

Docstrings generation was requested by @riccardomanfrin.

* https://github.com/netbirdio/netbird/pull/6374#issuecomment-4658991606

The following files were modified:

* `client/cmd/debug.go`
* `client/cmd/root.go`
* `client/internal/profilemanager/config.go`
* `client/mdm/policy.go`
* `client/mdm/policy_darwin.go`
* `client/mdm/policy_mobile.go`
* `client/mdm/policy_other.go`
* `client/mdm/policy_windows.go`
* `client/mdm/ticker.go`
* `client/server/mdm.go`
* `client/server/server.go`
* `client/ui/client_ui.go`
* `docs/netbird-macos.sh`
This commit is contained in:
coderabbitai[bot]
2026-06-09 10:49:57 +00:00
committed by GitHub
parent d7f00b3beb
commit 963d8c8825
13 changed files with 129 additions and 31 deletions
+5 -2
View File
@@ -70,7 +70,9 @@ const (
// It parses CLI flags, initializes logging, creates the Fyne application and tray icons,
// and constructs the service client (which may open a requested UI window). If a window-mode
// flag is set the Fyne event loop runs and main returns; otherwise it ensures only one
// instance is running, sets up signal handling and fonts, and starts the system tray loop.
// main is the program entry point that initializes logging and the Fyne UI, enforces single-instance behavior, creates the service client, and starts the system tray.
//
// It parses CLI flags, configures logging, constructs the Fyne application and service client (optionally showing a requested UI window), monitors theme/settings changes, ensures only a single instance runs (signaling an existing instance to show its window when present), sets up signal handling and default fonts, and finally runs the system tray loop.
func main() {
flags := parseFlags()
@@ -1698,7 +1700,8 @@ func (s *serviceClient) applyMDMLocks(managed []string) {
// Entry's placeholder slot. The placeholder is the only signal the user
// gets that a PSK is configured, because the entry's Text is forced to
// empty to keep the password reveal toggle from leaking the
// It returns an empty string if no pre-shared key is present; returns "MDM-managed" if the pre-shared key is enforced by MDM; otherwise returns "configured".
// preSharedKeyPlaceholder returns the placeholder text for the pre-shared key entry based on the daemon config.
// It returns an empty string if no pre-shared key is present, `MDM-managed` if the key is enforced by MDM, and `configured` otherwise.
func preSharedKeyPlaceholder(cfg *proto.GetConfigResponse) string {
if cfg == nil || cfg.PreSharedKey == "" {
return ""