Skip to content

Commit

Permalink
Use strings.EqualFold to compare manufacturer.
Browse files Browse the repository at this point in the history
EqualFold is a more idiomatic way for case-insensitive string comparison.

PiperOrigin-RevId: 631493115
  • Loading branch information
Glazier Bot authored and copybara-github committed May 7, 2024
1 parent d707387 commit e92ec5e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion go/device/device.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ func Model() (string, error) {
if err != nil {
return "unknown", err
}
if strings.ToLower(si.Manufacturer) == "lenovo" {
if strings.EqualFold(si.Manufacturer, "lenovo") {
return si.SystemFamily, nil
}
return si.Model, nil
Expand Down

0 comments on commit e92ec5e

Please sign in to comment.