Skip to content

Commit

Permalink
Fix #45 : Improve Device types consistency by using DeviceFactory ins…
Browse files Browse the repository at this point in the history
…tead of NewDevice
  • Loading branch information
mullerch committed Jan 24, 2025
1 parent 7ced431 commit a82e553
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Checkpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func (c *checkpoint) GetPropertyDevices() ([]Device, error) {

devices := make([]Device, len(devicesPaths))
for i, path := range devicesPaths {
devices[i], err = NewDevice(path)
devices[i], err = DeviceFactory(path)
if err != nil {
return devices, err
}
Expand Down
4 changes: 2 additions & 2 deletions NetworkManager.go
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ func (nm *networkManager) GetPropertyDevices() ([]Device, error) {

devices := make([]Device, len(devicesPaths))
for i, path := range devicesPaths {
devices[i], err = NewDevice(path)
devices[i], err = DeviceFactory(path)
if err != nil {
return devices, err
}
Expand All @@ -467,7 +467,7 @@ func (nm *networkManager) GetPropertyAllDevices() ([]Device, error) {

devices := make([]Device, len(devicesPaths))
for i, path := range devicesPaths {
devices[i], err = NewDevice(path)
devices[i], err = DeviceFactory(path)
if err != nil {
return devices, err
}
Expand Down

0 comments on commit a82e553

Please sign in to comment.