We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7c651d1 commit ccb49e5Copy full SHA for ccb49e5
string_to_string.go
@@ -4,6 +4,7 @@ import (
4
"bytes"
5
"encoding/csv"
6
"fmt"
7
+ "sort"
8
"strings"
9
)
10
@@ -62,8 +63,15 @@ func (s *stringToStringValue) Type() string {
62
63
}
64
65
func (s *stringToStringValue) String() string {
66
+ keys := make([]string, 0, len(*s.value))
67
+ for k := range *s.value {
68
+ keys = append(keys, k)
69
+ }
70
+ sort.Strings(keys)
71
+
72
records := make([]string, 0, len(*s.value)>>1)
- for k, v := range *s.value {
73
+ for _, k := range keys {
74
+ v := (*s.value)[k]
75
records = append(records, k+"="+v)
76
77
0 commit comments