Skip to content

Commit

Permalink
feat: func boolToIntString()
Browse files Browse the repository at this point in the history
  • Loading branch information
Tinyblargon committed Apr 15, 2024
1 parent 1b29c0f commit 7ab5a33
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions proxmox/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,14 @@ func failError(err error) {
}
}

// Convert a bool to a string "1" or "0"
func boolToIntString(b bool) string {
if b {
return "1"
}
return "0"
}

func arrayToStringArray[T fmt.Stringer](arr []T) []string {
strArr := make([]string, len(arr))
for i, v := range arr {
Expand Down

0 comments on commit 7ab5a33

Please sign in to comment.