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