all: doc changes, imp names
This commit is contained in:
parent
774937728b
commit
0e1015a4ee
|
@ -49,6 +49,7 @@ and this project adheres to
|
|||
|
||||
### Changed
|
||||
|
||||
- Client objects in the configuration file are now sorted ([#3933]).
|
||||
- Responses from cache are now labeled ([#3772]).
|
||||
- Better error message for ED25519 private keys, which are not widely supported
|
||||
([#3737]).
|
||||
|
@ -229,6 +230,7 @@ In this release, the schema version has changed from 10 to 12.
|
|||
[#3772]: https://github.com/AdguardTeam/AdGuardHome/issues/3772
|
||||
[#3815]: https://github.com/AdguardTeam/AdGuardHome/issues/3815
|
||||
[#3890]: https://github.com/AdguardTeam/AdGuardHome/issues/3890
|
||||
[#3933]: https://github.com/AdguardTeam/AdGuardHome/pull/3933
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -224,9 +224,9 @@ func (clients *clientsContainer) WriteDiskConfig(objects *[]clientObject) {
|
|||
clients.lock.Lock()
|
||||
defer clients.lock.Unlock()
|
||||
|
||||
clientObjects := []clientObject{}
|
||||
var clientObjects []clientObject
|
||||
for _, cli := range clients.list {
|
||||
cy := clientObject{
|
||||
cliObj := clientObject{
|
||||
Name: cli.Name,
|
||||
UseGlobalSettings: !cli.UseOwnSettings,
|
||||
FilteringEnabled: cli.FilteringEnabled,
|
||||
|
@ -236,18 +236,18 @@ func (clients *clientsContainer) WriteDiskConfig(objects *[]clientObject) {
|
|||
UseGlobalBlockedServices: !cli.UseOwnBlockedServices,
|
||||
}
|
||||
|
||||
cy.Tags = stringutil.CloneSlice(cli.Tags)
|
||||
cy.IDs = stringutil.CloneSlice(cli.IDs)
|
||||
cy.BlockedServices = stringutil.CloneSlice(cli.BlockedServices)
|
||||
cy.Upstreams = stringutil.CloneSlice(cli.Upstreams)
|
||||
cliObj.Tags = stringutil.CloneSlice(cli.Tags)
|
||||
cliObj.IDs = stringutil.CloneSlice(cli.IDs)
|
||||
cliObj.BlockedServices = stringutil.CloneSlice(cli.BlockedServices)
|
||||
cliObj.Upstreams = stringutil.CloneSlice(cli.Upstreams)
|
||||
|
||||
clientObjects = append(clientObjects, cy)
|
||||
clientObjects = append(clientObjects, cliObj)
|
||||
}
|
||||
|
||||
// Maps aren't guaranteed to iterate in the same order each time, so the
|
||||
// above loop can generate different orderings when writing to the
|
||||
// config file: this produces lots of diffs in config files, so sort
|
||||
// objects by name before writing.
|
||||
// above loop can generate different orderings when writing to the config
|
||||
// file: this produces lots of diffs in config files, so sort objects by
|
||||
// name before writing.
|
||||
sort.Slice(clientObjects, func(i, j int) bool {
|
||||
return clientObjects[i].Name < clientObjects[j].Name
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue