mirror of
https://github.com/spf13/viper
synced 2025-05-05 19:57:18 +00:00
Merge 54541f4c03
into 1be81c313a
This commit is contained in:
commit
8d5917cb70
1 changed files with 2 additions and 0 deletions
2
viper.go
2
viper.go
|
@ -29,6 +29,7 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"reflect"
|
"reflect"
|
||||||
|
"sort"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
|
@ -1932,6 +1933,7 @@ func (v *Viper) AllSettings() map[string]any {
|
||||||
|
|
||||||
func (v *Viper) getSettings(keys []string) map[string]any {
|
func (v *Viper) getSettings(keys []string) map[string]any {
|
||||||
m := map[string]any{}
|
m := map[string]any{}
|
||||||
|
sort.Strings(keys)
|
||||||
// start from the list of keys, and construct the map one value at a time
|
// start from the list of keys, and construct the map one value at a time
|
||||||
for _, k := range keys {
|
for _, k := range keys {
|
||||||
value := v.Get(k)
|
value := v.Get(k)
|
||||||
|
|
Loading…
Add table
Reference in a new issue