mirror of
https://github.com/netbirdio/netbird.git
synced 2026-10-07 14:09:07 +02:00
📝 Add docstrings to feature/k8s-api-auth-proxy
Docstrings generation was requested by @shyamganesh-tide. * https://github.com/netbirdio/netbird/pull/4975#issuecomment-3685447791 The following files were modified: * `client/cmd/kubeconfig.go` * `client/cmd/root.go` * `management/internals/shared/grpc/conversion.go`
This commit is contained in:
+9
-4
@@ -85,12 +85,16 @@ var (
|
||||
|
||||
// Execute executes the root command.
|
||||
func Execute() error {
|
||||
if isUpdateBinary() {
|
||||
return updateCmd.Execute()
|
||||
}
|
||||
return rootCmd.Execute()
|
||||
}
|
||||
|
||||
// init initializes package-level defaults and configures the root CLI command.
|
||||
// It sets OS-specific default paths for configuration and logs, determines the default
|
||||
// daemon address, registers persistent CLI flags (daemon address, management/admin URLs,
|
||||
// logging, setup key options, pre-shared key, hostname, anonymization, and config path),
|
||||
// and wires up all top-level and nested subcommands. It also defines upCmd-specific
|
||||
// flags for external IP mapping, custom DNS resolver address, Rosenpass options,
|
||||
// auto-connect control, and lazy connection.
|
||||
func init() {
|
||||
defaultConfigPathDir = "/etc/netbird/"
|
||||
defaultLogFileDir = "/var/log/netbird/"
|
||||
@@ -144,6 +148,7 @@ func init() {
|
||||
rootCmd.AddCommand(forwardingRulesCmd)
|
||||
rootCmd.AddCommand(debugCmd)
|
||||
rootCmd.AddCommand(profileCmd)
|
||||
rootCmd.AddCommand(kubeconfigCmd)
|
||||
|
||||
networksCMD.AddCommand(routesListCmd)
|
||||
networksCMD.AddCommand(routesSelectCmd, routesDeselectCmd)
|
||||
@@ -396,4 +401,4 @@ func getClient(cmd *cobra.Command) (*grpc.ClientConn, error) {
|
||||
}
|
||||
|
||||
return conn, nil
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user