lnd.xprv/kvdb/test.go

15 lines
182 B
Go
Raw Normal View History

2021-07-06 17:31:24 +03:00
package kvdb
type KV struct {
key string
val string
}
func reverseKVs(a []KV) []KV {
for i, j := 0, len(a)-1; i < j; i, j = i+1, j-1 {
a[i], a[j] = a[j], a[i]
}
return a
}