mirror of
https://github.com/octoleo/syncthing.git
synced 2024-09-11 01:19:00 +00:00
parent
6c73617974
commit
8c61e0d6ab
@ -6,7 +6,10 @@
|
||||
|
||||
package config
|
||||
|
||||
import "encoding/xml"
|
||||
import (
|
||||
"encoding/xml"
|
||||
"sort"
|
||||
)
|
||||
|
||||
type VersioningConfiguration struct {
|
||||
Type string `xml:"type,attr" json:"type"`
|
||||
@ -38,6 +41,9 @@ func (c *VersioningConfiguration) MarshalXML(e *xml.Encoder, start xml.StartElem
|
||||
for k, v := range c.Params {
|
||||
tmp.Params = append(tmp.Params, InternalParam{k, v})
|
||||
}
|
||||
sort.Slice(tmp.Params, func(a, b int) bool {
|
||||
return tmp.Params[a].Key < tmp.Params[b].Key
|
||||
})
|
||||
|
||||
return e.EncodeElement(tmp, start)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user