Pull request: home: don't miss blocked clients in client search api

Merge in DNS/adguard-home from 2428-blocked-runtime-fix to master

Updates #2428.

Squashed commit of the following:

commit 8aaa3e22a894f0335ced93339655771989846c94
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Fri Jan 15 16:32:53 2021 +0300

    home: don't miss blocked clients in client search api
This commit is contained in:
Ainar Garipov
2021-01-15 20:30:48 +03:00
parent 56cb8a4dde
commit 679bbcdc26
5 changed files with 75 additions and 17 deletions

View File

@@ -27,5 +27,13 @@ go="${GO:-go}"
# those aren't set.
"$go" mod download $x_flags
env GOBIN="${PWD}/bin" "$go" install $v_flags $x_flags\
# Reset GOARCH and GOOS to make sure we install the tools for the native
# architecture even when we're cross-compiling the main binary, and also
# to prevent the "cannot install cross-compiled binaries when GOBIN is
# set" error.
env\
GOARCH=""\
GOOS=""\
GOBIN="${PWD}/bin"\
"$go" install $v_flags $x_flags\
github.com/gobuffalo/packr/packr

View File

@@ -2,16 +2,38 @@
verbose="${VERBOSE:-0}"
if [ "$verbose" -gt '0' ]
if [ "$verbose" -gt '1' ]
then
set -x
readonly v_flags='-v'
readonly x_flags='-x'
elif [ "$verbose" -gt '0' ]
then
set -x
readonly v_flags='-v'
readonly x_flags=''
else
set +x
readonly v_flags=''
readonly x_flags=''
fi
set -e -f -u
go="${GO:-go}"
# TODO(a.garipov): Add goconst?
env GOBIN="${PWD}/bin" "$GO" install --modfile=./internal/tools/go.mod\
# Reset GOARCH and GOOS to make sure we install the tools for the native
# architecture even when we're cross-compiling the main binary, and also
# to prevent the "cannot install cross-compiled binaries when GOBIN is
# set" error.
env\
GOARCH=""\
GOOS=""\
GOBIN="${PWD}/bin"\
"$go" install --modfile=./internal/tools/go.mod\
$v_flags $x_flags\
github.com/fzipp/gocyclo/cmd/gocyclo\
github.com/golangci/misspell/cmd/misspell\
github.com/gordonklaus/ineffassign\