mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-08 22:31:04 +00:00
parent
6c73617974
commit
8c61e0d6ab
@ -6,7 +6,10 @@
|
|||||||
|
|
||||||
package config
|
package config
|
||||||
|
|
||||||
import "encoding/xml"
|
import (
|
||||||
|
"encoding/xml"
|
||||||
|
"sort"
|
||||||
|
)
|
||||||
|
|
||||||
type VersioningConfiguration struct {
|
type VersioningConfiguration struct {
|
||||||
Type string `xml:"type,attr" json:"type"`
|
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 {
|
for k, v := range c.Params {
|
||||||
tmp.Params = append(tmp.Params, InternalParam{k, v})
|
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)
|
return e.EncodeElement(tmp, start)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user