mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-10 12:32:03 +00:00
sort token usages in kubeadm
This commit is contained in:
parent
fbe2d15f8c
commit
37bc44f66b
@ -20,6 +20,7 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"sort"
|
||||
"strings"
|
||||
"text/tabwriter"
|
||||
"time"
|
||||
@ -287,6 +288,7 @@ func RunListTokens(out io.Writer, errW io.Writer, client *clientset.Clientset) e
|
||||
}
|
||||
usages = append(usages, strings.TrimPrefix(k, bootstrapapi.BootstrapTokenUsagePrefix))
|
||||
}
|
||||
sort.Strings(usages)
|
||||
usageString := strings.Join(usages, ",")
|
||||
if len(usageString) == 0 {
|
||||
usageString = "<none>"
|
||||
|
Loading…
Reference in New Issue
Block a user