Skip to content

Commit 6beb7cd

Browse files
committed
internal/cmdlets: Ensure remap presents quads in the same order every time
1 parent 81a90e9 commit 6beb7cd

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

internal/cmdlets/fms_remap.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import (
99
"fmt"
1010
"net/http"
1111
"os"
12+
"sort"
1213
"strconv"
1314

1415
"github.com/AlecAivazis/survey/v2"
@@ -48,6 +49,7 @@ func fmsRemapCmdRun(c *cobra.Command, args []string) {
4849
fmt.Fprintf(os.Stderr, "Error getting quads: %s\n", err)
4950
os.Exit(2)
5051
}
52+
sort.Strings(quads)
5153
r.Body.Close()
5254

5355
r, err = http.Get("http://" + fAddr + "/admin/map/current")

pkg/http/option.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,6 @@ func WithFMSConf(c fms.Config) Option {
4747
}
4848
}
4949

50-
// WithQuads tells the server what quadrants are available to
51-
// configure.
52-
func WithQuads(q []string) Option {
53-
return func(s *Server) error {
54-
s.quads = q
55-
return nil
56-
}
57-
}
58-
5950
// WithStartupWG allows a waitgroup to be passed in so the server can
6051
// notify when its finished with startup tasks to allow a nice message
6152
// to be printed to the console.

0 commit comments

Comments
 (0)