MCPcopy Create free account
hub / github.com/XmirrorSecurity/OpenSCA-cli / sortMapString

Function sortMapString

cmd/format/bomsw.go:101–112  ·  view source on GitHub ↗
(v map[string]string)

Source from the content-addressed store, hash-verified

99}
100
101func sortMapString(v map[string]string) string {
102 keys := []string{}
103 for key := range v {
104 keys = append(keys, key)
105 }
106 sort.Strings(keys)
107 res := strings.Builder{}
108 for _, key := range keys {
109 res.WriteString(key + ":" + v[key])
110 }
111 return res.String()
112}

Callers 1

calculateSbomHashCheckFunction · 0.85

Calls 2

WriteStringMethod · 0.80
StringMethod · 0.45

Tested by

no test coverage detected