File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,10 @@ func workspaceCreate() *cobra.Command {
67
67
return err
68
68
}
69
69
70
+ slices .SortFunc (templates , func (a , b codersdk.Template ) bool {
71
+ return a .WorkspaceOwnerCount > b .WorkspaceOwnerCount
72
+ })
73
+
70
74
templateNames := make ([]string , 0 , len (templates ))
71
75
templateByName := make (map [string ]codersdk.Template , len (templates ))
72
76
@@ -85,9 +89,6 @@ func workspaceCreate() *cobra.Command {
85
89
templateNames = append (templateNames , templateName )
86
90
templateByName [templateName ] = template
87
91
}
88
- slices .SortFunc (templateNames , func (a , b string ) bool {
89
- return templateByName [a ].WorkspaceOwnerCount > templateByName [b ].WorkspaceOwnerCount
90
- })
91
92
92
93
// Move the cursor up a single line for nicer display!
93
94
option , err := cliui .Select (cmd , cliui.SelectOptions {
You can’t perform that action at this time.
0 commit comments