1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-24 21:42:51 -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) return nil, fmt.Errorf("failed to get connections: %w", err)
} }
var profiles []VPNProfile profiles := []VPNProfile{}
for _, conn := range connections { for _, conn := range connections {
settings, err := conn.GetSettings() settings, err := conn.GetSettings()
if err != nil { if err != nil {
@@ -101,7 +101,7 @@ func (b *NetworkManagerBackend) ListActiveVPN() ([]VPNActive, error) {
return nil, fmt.Errorf("failed to get active connections: %w", err) return nil, fmt.Errorf("failed to get active connections: %w", err)
} }
var active []VPNActive active := []VPNActive{}
for _, activeConn := range activeConns { for _, activeConn := range activeConns {
connType, err := activeConn.GetPropertyType() connType, err := activeConn.GetPropertyType()
if err != nil { if err != nil {