Skip to content

Commit 6809ca4

Browse files
committed
Renamed GetExtraProperties to GetUnitTypeProperties
Also changed the name of the subclass parameter to unitType to match.
1 parent ef1b992 commit 6809ca4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

dbus/methods.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -166,11 +166,11 @@ func (c *Conn) GetUnitProperties(unit string) (map[string]interface{}, error) {
166166
return c.getProperties(unit, "org.freedesktop.systemd1.Unit")
167167
}
168168

169-
// GetExtraProperties returns the extra properties for a unit, specific to the unit type.
170-
// Valid values for subclass: Service, Socket, Target, Device, Mount, Automount, Snapshot, Timer, Swap, Path, Slice, Scope
171-
// return "dbus.Error: Unknown interface" if the subclass is not the correct type of the unit
172-
func (c *Conn) GetExtraProperties(unit string, subclass string) (map[string]interface{}, error) {
173-
return c.getProperties(unit, "org.freedesktop.systemd1." + subclass)
169+
// GetUnitTypeProperties returns the extra properties for a unit, specific to the unit type.
170+
// Valid values for unitType: Service, Socket, Target, Device, Mount, Automount, Snapshot, Timer, Swap, Path, Slice, Scope
171+
// return "dbus.Error: Unknown interface" if the unitType is not the correct type of the unit
172+
func (c *Conn) GetUnitTypeProperties(unit string, unitType string) (map[string]interface{}, error) {
173+
return c.getProperties(unit, "org.freedesktop.systemd1." + unitType)
174174
}
175175

176176
// ListUnits returns an array with all currently loaded units. Note that

0 commit comments

Comments
 (0)