Skip to content

Commit

Permalink
fix: make disk type matcher parser case insensitive
Browse files Browse the repository at this point in the history
We show disk type as uppercase in `talosctl disk`, so it may happen that
someone will specify it in uppercase in the matcher as well.

Signed-off-by: Artem Chernyshev <artem.0xD2@gmail.com>
  • Loading branch information
Unix4ever authored and talos-bot committed May 10, 2021
1 parent b77400e commit 1292574
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions blockdevice/util/disk/disks.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ func (t Type) String() string {

// ParseType converts string id to the disk type id.
func ParseType(id string) (Type, error) {
id = strings.ToLower(id)

switch id {
case "ssd":
return TypeSSD, nil
Expand Down

0 comments on commit 1292574

Please sign in to comment.