From 1292574643e06512255fb0f45107e0c296eb5a3b Mon Sep 17 00:00:00 2001 From: Artem Chernyshev Date: Sun, 9 May 2021 22:41:32 +0300 Subject: [PATCH] fix: make disk type matcher parser case insensitive 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 --- blockdevice/util/disk/disks.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/blockdevice/util/disk/disks.go b/blockdevice/util/disk/disks.go index c5e4266..68f4d15 100644 --- a/blockdevice/util/disk/disks.go +++ b/blockdevice/util/disk/disks.go @@ -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