sort all map type result in ocic
Signed-off-by: Crazykev <crazykev@zju.edu.cn>
This commit is contained in:
parent
018c4db06d
commit
295c32331a
2 changed files with 23 additions and 12 deletions
|
@ -453,14 +453,14 @@ func ListContainers(client pb.RuntimeServiceClient, opts listOptions) error {
|
|||
}
|
||||
if c.Labels != nil {
|
||||
fmt.Println("Labels:")
|
||||
for k, v := range c.Labels {
|
||||
fmt.Printf("\t%s -> %s\n", k, v)
|
||||
for _, k := range getSortedKeys(c.Labels) {
|
||||
fmt.Printf("\t%s -> %s\n", k, c.Labels[k])
|
||||
}
|
||||
}
|
||||
if c.Annotations != nil {
|
||||
fmt.Println("Annotations:")
|
||||
for k, v := range c.Annotations {
|
||||
fmt.Printf("\t%s -> %s\n", k, v)
|
||||
for _, k := range getSortedKeys(c.Annotations) {
|
||||
fmt.Printf("\t%s -> %s\n", k, c.Annotations[k])
|
||||
}
|
||||
}
|
||||
fmt.Println()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue