From f2305b3ce623f7f354446965f14b3b6661a9bf51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Wei=C3=9Fe?= Date: Mon, 2 May 2022 09:28:37 +0200 Subject: [PATCH] Regenerate cloudprovider strings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Daniel Weiße --- cli/cloudprovider/cloudprovider.go | 5 ++++- cli/cloudprovider/cloudprovider_string.go | 26 ---------------------- cli/cloudprovider/provider_string.go | 27 +++++++++++++++++++++++ 3 files changed, 31 insertions(+), 27 deletions(-) delete mode 100644 cli/cloudprovider/cloudprovider_string.go create mode 100644 cli/cloudprovider/provider_string.go diff --git a/cli/cloudprovider/cloudprovider.go b/cli/cloudprovider/cloudprovider.go index fdabf48d1..a7025457b 100644 --- a/cli/cloudprovider/cloudprovider.go +++ b/cli/cloudprovider/cloudprovider.go @@ -2,7 +2,7 @@ package cloudprovider import "strings" -//go:generate stringer -type=CloudProvider +//go:generate stringer -type=Provider // Provider is cloud provider used by the CLI. type Provider uint32 @@ -12,6 +12,7 @@ const ( AWS Azure GCP + QEMU ) // FromString returns cloud provider from string. @@ -24,6 +25,8 @@ func FromString(s string) Provider { return Azure case "gcp": return GCP + case "qemu": + return QEMU default: return Unknown } diff --git a/cli/cloudprovider/cloudprovider_string.go b/cli/cloudprovider/cloudprovider_string.go deleted file mode 100644 index 93df51210..000000000 --- a/cli/cloudprovider/cloudprovider_string.go +++ /dev/null @@ -1,26 +0,0 @@ -// Code generated by "stringer -type=CloudProvider"; DO NOT EDIT. - -package cloudprovider - -import "strconv" - -func _() { - // An "invalid array index" compiler error signifies that the constant values have changed. - // Re-run the stringer command to generate them again. - var x [1]struct{} - _ = x[Unknown-0] - _ = x[AWS-1] - _ = x[Azure-2] - _ = x[GCP-3] -} - -const _CloudProvider_name = "UnknownAWSAzureGCP" - -var _CloudProvider_index = [...]uint8{0, 7, 10, 15, 18} - -func (i Provider) String() string { - if i >= Provider(len(_CloudProvider_index)-1) { - return "CloudProvider(" + strconv.FormatInt(int64(i), 10) + ")" - } - return _CloudProvider_name[_CloudProvider_index[i]:_CloudProvider_index[i+1]] -} diff --git a/cli/cloudprovider/provider_string.go b/cli/cloudprovider/provider_string.go new file mode 100644 index 000000000..f396a06be --- /dev/null +++ b/cli/cloudprovider/provider_string.go @@ -0,0 +1,27 @@ +// Code generated by "stringer -type=Provider"; DO NOT EDIT. + +package cloudprovider + +import "strconv" + +func _() { + // An "invalid array index" compiler error signifies that the constant values have changed. + // Re-run the stringer command to generate them again. + var x [1]struct{} + _ = x[Unknown-0] + _ = x[AWS-1] + _ = x[Azure-2] + _ = x[GCP-3] + _ = x[QEMU-4] +} + +const _Provider_name = "UnknownAWSAzureGCPQEMU" + +var _Provider_index = [...]uint8{0, 7, 10, 15, 18, 22} + +func (i Provider) String() string { + if i >= Provider(len(_Provider_index)-1) { + return "Provider(" + strconv.FormatInt(int64(i), 10) + ")" + } + return _Provider_name[_Provider_index[i]:_Provider_index[i+1]] +}