networkmanager-go

module
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 17, 2021 License: Apache-2.0

README

NetworkManager Go wrapper

Golang wrapper for NetworkManager implemented through D-Bus.

List all available connections:

client, err := networkmanager.NewClient()
if err != nil {
	panic(err)
}
defer client.Close()

connections, err := client.ListConnections()
if err != nil {
	panic(err)
}

for _, conn := range connections {
	settings, err := conn.GetSettings()
	if err != nil {
		panic(err)
	}

	fmt.Printf("%s (%s)\n", settings["connection"]["id"], settings["connection"]["uuid"])
}

Find more example under the examples/ directory.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL