all: sync with master; upd chlog

This commit is contained in:
Ainar Garipov
2023-10-11 17:31:41 +03:00
parent 258eecc55b
commit 760d466b38
139 changed files with 39736 additions and 18364 deletions

View File

@@ -120,6 +120,9 @@ Optional environment:
Optional environment:
* `GOAMD64`: architectural level for [AMD64][amd64]. The default value is
`v1`.
* `GOARM`: ARM processor options for the Go compiler.
* `GOMIPS`: ARM processor options for the Go compiler.
@@ -146,7 +149,8 @@ Required environment:
* `CHANNEL`: release channel, see above.
[repr]: https://reproducible-builds.org/docs/source-date-epoch/
[amd64]: https://github.com/golang/go/wiki/MinimumRequirements#amd64
[repr]: https://reproducible-builds.org/docs/source-date-epoch/

View File

@@ -35,7 +35,7 @@ set -f -u
go_version="$( "${GO:-go}" version )"
readonly go_version
go_min_version='go1.20.8'
go_min_version='go1.20.10'
go_version_msg="
warning: your go version (${go_version}) is different from the recommended minimal one (${go_min_version}).
if you have the version installed, please set the GO environment variable.
@@ -206,7 +206,6 @@ run_linter gocognit --over='10'\
./internal/aghalg/\
./internal/aghchan/\
./internal/aghhttp/\
./internal/aghio/\
./internal/aghrenameio/\
./internal/aghtest/\
./internal/arpdb/\
@@ -243,7 +242,6 @@ run_linter fieldalignment \
./internal/aghalg/\
./internal/aghchan/\
./internal/aghhttp/\
./internal/aghio/\
./internal/aghos/\
./internal/aghrenameio/\
./internal/aghtest/\
@@ -272,7 +270,6 @@ run_linter gosec --quiet\
./internal/aghalg/\
./internal/aghchan/\
./internal/aghhttp/\
./internal/aghio/\
./internal/aghnet/\
./internal/aghos/\
./internal/aghrenameio/\

View File

@@ -12,8 +12,8 @@ import (
"sync"
"time"
"github.com/AdguardTeam/AdGuardHome/internal/aghio"
"github.com/AdguardTeam/golibs/errors"
"github.com/AdguardTeam/golibs/ioutil"
"github.com/AdguardTeam/golibs/log"
"golang.org/x/exp/slices"
)
@@ -148,12 +148,7 @@ func getTranslation(client *http.Client, url string) (data []byte, err error) {
// Go on and download the body for inspection.
}
limitReader, lrErr := aghio.LimitReader(resp.Body, readLimit)
if lrErr != nil {
// Generally shouldn't happen, since the only error returned by
// [aghio.LimitReader] is an argument error.
panic(fmt.Errorf("limit reading: %w", lrErr))
}
limitReader := ioutil.LimitReader(resp.Body, readLimit)
data, readErr := io.ReadAll(limitReader)