mirror of
https://github.com/yusing/godoxy.git
synced 2026-03-17 23:14:21 +01:00
fix(proxmox): handle case when no nodes are available in AvailableNodeNames function
This commit is contained in:
@@ -19,6 +19,9 @@ type Node struct {
|
||||
var Nodes = pool.New[*Node]("proxmox_nodes")
|
||||
|
||||
func AvailableNodeNames() string {
|
||||
if Nodes.Size() == 0 {
|
||||
return ""
|
||||
}
|
||||
var sb strings.Builder
|
||||
for _, node := range Nodes.Iter {
|
||||
sb.WriteString(node.name)
|
||||
|
||||
Reference in New Issue
Block a user