Skip to content

Commit 4fcee50

Browse files
committed
Sort backend names in error messages
1 parent 4696137 commit 4fcee50

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/store/store.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,12 @@ func FactoryFromEnv(ctx context.Context) (Factory, error) {
5959
}
6060

6161
if chosen == "" && len(candidates) == 0 {
62-
available := slices.Collect(maps.Keys(registry.Registry))
62+
available := slices.Sorted(maps.Keys(registry.Registry))
6363
return nil, fmt.Errorf(
6464
"can't find environment settings to select between store backends: %v", available)
6565
}
6666
if chosen == "" {
67-
options := slices.Collect(maps.Keys(candidates))
67+
options := slices.Sorted(maps.Keys(candidates))
6868
return nil, fmt.Errorf(
6969
"environment settings match multiple store backends: %v", options)
7070
}

0 commit comments

Comments
 (0)