mirror of
https://github.com/coder/coder.git
synced 2025-07-12 00:14:10 +00:00
chore: upgrade tailscale to v1.46.1 (#8913)
This commit is contained in:
@ -14,6 +14,8 @@ import (
|
||||
"golang.org/x/exp/slices"
|
||||
"golang.org/x/xerrors"
|
||||
"gopkg.in/yaml.v3"
|
||||
|
||||
"github.com/coder/coder/coderd/util/slice"
|
||||
)
|
||||
|
||||
// Cmd describes an executable command.
|
||||
@ -102,11 +104,11 @@ func (c *Cmd) PrepareAll() error {
|
||||
}
|
||||
}
|
||||
|
||||
slices.SortFunc(c.Options, func(a, b Option) bool {
|
||||
return a.Name < b.Name
|
||||
slices.SortFunc(c.Options, func(a, b Option) int {
|
||||
return slice.Ascending(a.Name, b.Name)
|
||||
})
|
||||
slices.SortFunc(c.Children, func(a, b *Cmd) bool {
|
||||
return a.Name() < b.Name()
|
||||
slices.SortFunc(c.Children, func(a, b *Cmd) int {
|
||||
return slice.Ascending(a.Name(), b.Name())
|
||||
})
|
||||
for _, child := range c.Children {
|
||||
child.Parent = c
|
||||
|
@ -24,6 +24,7 @@ import (
|
||||
|
||||
"github.com/coder/coder/cli/clibase"
|
||||
"github.com/coder/coder/cli/cliui"
|
||||
"github.com/coder/coder/coderd/util/slice"
|
||||
"github.com/coder/coder/codersdk"
|
||||
)
|
||||
|
||||
@ -367,8 +368,8 @@ func (r *RootCmd) configSSH() *clibase.Cmd {
|
||||
}
|
||||
|
||||
// Ensure stable sorting of output.
|
||||
slices.SortFunc(workspaceConfigs, func(a, b sshWorkspaceConfig) bool {
|
||||
return a.Name < b.Name
|
||||
slices.SortFunc(workspaceConfigs, func(a, b sshWorkspaceConfig) int {
|
||||
return slice.Ascending(a.Name, b.Name)
|
||||
})
|
||||
for _, wc := range workspaceConfigs {
|
||||
sort.Strings(wc.Hosts)
|
||||
|
@ -13,6 +13,7 @@ import (
|
||||
"github.com/coder/coder/cli/clibase"
|
||||
"github.com/coder/coder/cli/cliui"
|
||||
"github.com/coder/coder/coderd/util/ptr"
|
||||
"github.com/coder/coder/coderd/util/slice"
|
||||
"github.com/coder/coder/codersdk"
|
||||
)
|
||||
|
||||
@ -81,8 +82,8 @@ func (r *RootCmd) create() *clibase.Cmd {
|
||||
return err
|
||||
}
|
||||
|
||||
slices.SortFunc(templates, func(a, b codersdk.Template) bool {
|
||||
return a.ActiveUserCount > b.ActiveUserCount
|
||||
slices.SortFunc(templates, func(a, b codersdk.Template) int {
|
||||
return slice.Descending(a.ActiveUserCount, b.ActiveUserCount)
|
||||
})
|
||||
|
||||
templateNames := make([]string, 0, len(templates))
|
||||
|
Reference in New Issue
Block a user