📝 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
+7 -2
View File
@@ -109,7 +109,9 @@ var debugConfigCmd = &cobra.Command{
// debugConfigDump requests the daemon for the resolved effective configuration and prints it as indented JSON.
// It resolves the active profile and current OS user, calls DaemonService.GetConfig with those values, and
// marshals the response using protojson with default/zero-valued fields included.
// Returns an error if profile or user lookup fails, the gRPC call fails, or the response cannot be marshaled.
// debugConfigDump prints the daemon's effective configuration for the active profile and current OS user as indented JSON.
// It requests the configuration from the daemon and writes the protobuf response with default fields emitted to stdout.
// Returns an error if active profile or user lookup fails, the daemon RPC fails, or the response cannot be marshaled.
func debugConfigDump(cmd *cobra.Command, _ []string) error {
pm := profilemanager.NewProfileManager()
activeProf, err := pm.GetActiveProfile()
@@ -155,7 +157,10 @@ func debugConfigDump(cmd *cobra.Command, _ []string) error {
// local file path and, if uploaded, the uploaded file key.
// It uses the package flags (anonymize, system info, log file count, CLI version and
// optional upload URL) to configure the bundle request. Returns an error if the RPC
// fails or if the daemon reports an upload failure reason.
// debugBundle requests creation of a debug bundle from the daemon and prints
// the local bundle file path and, if uploading was enabled, the uploaded file key.
// It returns an error if the RPC fails, if the daemon reports an upload failure
// reason, or if establishing the connection fails.
func debugBundle(cmd *cobra.Command, _ []string) error {
conn, err := getClient(cmd)
if err != nil {