1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-24 13:32:50 -05:00

vpn: initialize slices so they dont serialize as null

This commit is contained in:
bbedward
2025-12-27 10:52:34 -05:00
parent 23a93082c6
commit 40a96c6eaf

View File

@@ -33,7 +33,7 @@ func (b *NetworkManagerBackend) ListVPNProfiles() ([]VPNProfile, error) {
return nil, fmt.Errorf("failed to get connections: %w", err)
}
var profiles []VPNProfile
profiles := []VPNProfile{}
for _, conn := range connections {
settings, err := conn.GetSettings()
if err != nil {
@@ -101,7 +101,7 @@ func (b *NetworkManagerBackend) ListActiveVPN() ([]VPNActive, error) {
return nil, fmt.Errorf("failed to get active connections: %w", err)
}
var active []VPNActive
active := []VPNActive{}
for _, activeConn := range activeConns {
connType, err := activeConn.GetPropertyType()
if err != nil {