0
0
mirror of https://github.com/bpg/terraform-provider-proxmox.git synced 2025-06-29 18:21:10 +00:00
terraform-provider-proxmox/utils/strings.go
Pavel Boldyrev 4f70459c26
chore(code): fix code quality warnings (#1409)
* chore(code): fix code quality warnings

+ re-enable Qodana on PRs

---------

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-06-25 00:47:50 -04:00

19 lines
513 B
Go

/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
package utils
// ConvertToStringSlice helps convert interface slice to string slice.
func ConvertToStringSlice(interfaceSlice []interface{}) []string {
resultSlice := make([]string, len(interfaceSlice))
for i, val := range interfaceSlice {
resultSlice[i] = val.(string)
}
return resultSlice
}