Allow UUID fuzzy search for `--tenant`
You can now specify either a full or partial UUID when setting
`--tenant`, either via CLI, or the environment variable SHIELD_TENANT.
@@ -62,6 +62,8 @@ func (c *Client) FindMyTenant(q string, fuzzy bool) (*Tenant, error) {
l = append(l, tenant)
} else if fuzzy && strings.Contains(strings.ToLower(tenant.Name), q) {
l = append(l, tenant)
+ } else if fuzzy && strings.HasPrefix(strings.ToLower(tenant.UUID), q) {
+ l = append(l, tenant)
}
}
