Skip to content

Commit

Permalink
sysfs: change power supply scope to string (prometheus#145)
Browse files Browse the repository at this point in the history
/sys/class/power_supply/<power_supply>/scope is currently parsed as
uint64, but is is actually a string.

Signed-off-by: Sven Haardiek <sven.haardiek@iotec-gmbh.de>
  • Loading branch information
Sven Haardiek committed Mar 25, 2019
1 parent 55ae3d9 commit b4c564e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sysfs/class_power_supply.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ type PowerSupply struct {
PowerNow *int64 `fileName:"power_now"` // /sys/class/power_suppy/<Name>/power_now
PrechargeCurrent *int64 `fileName:"precharge_current"` // /sys/class/power_suppy/<Name>/precharge_current
Present *int64 `fileName:"present"` // /sys/class/power_suppy/<Name>/present
Scope *int64 `fileName:"scope"` // /sys/class/power_suppy/<Name>/scope
Scope string `fileName:"scope"` // /sys/class/power_suppy/<Name>/scope
SerialNumber string `fileName:"serial_number"` // /sys/class/power_suppy/<Name>/serial_number
Status string `fileName:"status"` // /sys/class/power_supply/<Name>/status
Technology string `fileName:"technology"` // /sys/class/power_suppy/<Name>/technology
Expand Down

0 comments on commit b4c564e

Please sign in to comment.