mirror of
https://github.com/lightningnetwork/lnd.git
synced 2024-11-19 09:53:54 +01:00
15 lines
182 B
Go
15 lines
182 B
Go
|
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
|
||
|
}
|