ipam/cmd/generic.go
2023-03-25 15:16:26 +01:00

9 lines
222 B
Go

package cmd
func reverse(elements []string) []string {
for i := 0; i < len(elements)/2; i++ {
j := len(elements) - i - 1
elements[i], elements[j] = elements[j], elements[i]
}
return elements
}