Fix some minor wording issues
This commit is contained in:
parent
31f3742308
commit
ff0009bd91
|
@ -1,3 +1,3 @@
|
||||||
```release-note:feature
|
```release-note:feature
|
||||||
cli: snapshot inspect command provides KV space usage breakdown
|
cli: snapshot inspect command provides KV usage breakdown
|
||||||
```
|
```
|
||||||
|
|
|
@ -172,8 +172,8 @@ type typeStats struct {
|
||||||
Count int
|
Count int
|
||||||
}
|
}
|
||||||
|
|
||||||
// Generate the stats for the output struct that's
|
// generateStats formats the stats for the output struct
|
||||||
// used to produce the printed output the user sees.
|
// that's used to produce the printed output the user sees.
|
||||||
func generateStats(info SnapshotInfo) []typeStats {
|
func generateStats(info SnapshotInfo) []typeStats {
|
||||||
ss := make([]typeStats, 0, len(info.Stats))
|
ss := make([]typeStats, 0, len(info.Stats))
|
||||||
|
|
||||||
|
@ -186,8 +186,9 @@ func generateStats(info SnapshotInfo) []typeStats {
|
||||||
return ss
|
return ss
|
||||||
}
|
}
|
||||||
|
|
||||||
// Generate the KV stats for the output struct that's
|
// generateKVStats reformats the KV stats to work with
|
||||||
// used to produce the printed output the user sees.
|
// the output struct that's used to produce the printed
|
||||||
|
// output the user sees.
|
||||||
func generateKVStats(info SnapshotInfo) []typeStats {
|
func generateKVStats(info SnapshotInfo) []typeStats {
|
||||||
kvLen := len(info.StatsKV)
|
kvLen := len(info.StatsKV)
|
||||||
if kvLen > 0 {
|
if kvLen > 0 {
|
||||||
|
@ -205,7 +206,8 @@ func generateKVStats(info SnapshotInfo) []typeStats {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sort the stat slice
|
// sortTypeStats sorts the stat slice by size and then
|
||||||
|
// alphabetically in the case the size is identical
|
||||||
func sortTypeStats(stats []typeStats) []typeStats {
|
func sortTypeStats(stats []typeStats) []typeStats {
|
||||||
sort.Slice(stats, func(i, j int) bool {
|
sort.Slice(stats, func(i, j int) bool {
|
||||||
// sort alphabetically if size is equal
|
// sort alphabetically if size is equal
|
||||||
|
|
Loading…
Reference in New Issue