docstring_tokens
stringlengths
0
76.5k
code_tokens
stringlengths
75
1.81M
label_window
sequencelengths
4
2.12k
html_url
stringlengths
74
116
file_name
stringlengths
3
311
"github.com/AdguardTeam/AdGuardHome/internal/testutil"
<mask> "sync" <mask> "testing" <mask> "time" <mask> <mask> "github.com/AdguardTeam/AdGuardHome/internal/util" <mask> <mask> "github.com/AdguardTeam/AdGuardHome/internal/dhcpd" <mask> "github.com/AdguardTeam/AdGuardHome/internal/dnsfilter" <mask> "github.com/AdguardTeam/dnsproxy/proxy" <mask> "github.com/AdguardTeam/dnsproxy/upstream" </s> Pull request: 2273 clean tests output Merge in DNS/adguard-home from 2273-clean-tests-output to master Closes #2273. Squashed commit of the following: commit 7571a33fc1f76300bd256578b3afa95338e399c4 Merge: f17df0f9c a19523b25 Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 15:45:30 2020 +0300 Merge branch 'master' into 2273-clean-tests-output commit f17df0f9ce2a3ed25db33fbc6a2e7cabd33f657b Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 15:35:42 2020 +0300 home: move build constraint on top line commit 3717c8ef5a51f9dcaa7e524bfa7b0f1d90bec93d Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 15:24:50 2020 +0300 all: add improvements to changelog commit de6d5afe39d74a3c3d3e0bbe6d0e09aea0214d56 Merge: 43d4f7acf 394fc5a9d Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 15:04:38 2020 +0300 Merge branch 'master' into 2273-clean-tests-output commit 43d4f7acf188e810aa7277cb6479110c9842e8be Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 13:38:13 2020 +0300 dnsfilter: remove redundant test logging commit 7194c1413006b8f52fc454e89ab052bf52e4e517 Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 12:19:14 2020 +0300 testutil: improve comments commit 9f17ab08e287fa69ce30d9e7eec8ea8880f87716 Author: Eugene Burkov <[email protected]> Date: Sat Nov 14 01:22:08 2020 +0300 nclient4: fix wrong function name commit f355749149b2a4485792ba2bdcbc0bb4b629d726 Author: Eugene Burkov <[email protected]> Date: Sat Nov 14 01:07:22 2020 +0300 testutil: fix comments and naming commit f8c50a260bfae08d594a7f37d603941d3680a45e Author: Eugene Burkov <[email protected]> Date: Fri Nov 13 14:09:50 2020 +0300 testutil: create a package and include it commit f169cdc4084b719de65aa0cdc65200b48785322e Author: Eugene Burkov <[email protected]> Date: Thu Nov 12 20:15:58 2020 +0300 agherr: discard loggers output commit 360e736b5a2a30f2c5350448234f14b841e3ea27 Author: Eugene Burkov <[email protected]> Date: Thu Nov 12 20:09:55 2020 +0300 all: replace default log writer with ioutil.Discard Closes #2273.
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/6358240e9b0f10acdc05b470a64535df8cfcf67e
internal/dnsforward/dnsforward_test.go
func TestMain(m *testing.M) { testutil.DiscardLogOutput(m) }
<mask> "github.com/stretchr/testify/assert" <mask> ) <mask> <mask> const ( <mask> tlsServerName = "testdns.adguard.com" <mask> testMessagesCount = 10 <mask> ) </s> Pull request: 2273 clean tests output Merge in DNS/adguard-home from 2273-clean-tests-output to master Closes #2273. Squashed commit of the following: commit 7571a33fc1f76300bd256578b3afa95338e399c4 Merge: f17df0f9c a19523b25 Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 15:45:30 2020 +0300 Merge branch 'master' into 2273-clean-tests-output commit f17df0f9ce2a3ed25db33fbc6a2e7cabd33f657b Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 15:35:42 2020 +0300 home: move build constraint on top line commit 3717c8ef5a51f9dcaa7e524bfa7b0f1d90bec93d Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 15:24:50 2020 +0300 all: add improvements to changelog commit de6d5afe39d74a3c3d3e0bbe6d0e09aea0214d56 Merge: 43d4f7acf 394fc5a9d Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 15:04:38 2020 +0300 Merge branch 'master' into 2273-clean-tests-output commit 43d4f7acf188e810aa7277cb6479110c9842e8be Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 13:38:13 2020 +0300 dnsfilter: remove redundant test logging commit 7194c1413006b8f52fc454e89ab052bf52e4e517 Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 12:19:14 2020 +0300 testutil: improve comments commit 9f17ab08e287fa69ce30d9e7eec8ea8880f87716 Author: Eugene Burkov <[email protected]> Date: Sat Nov 14 01:22:08 2020 +0300 nclient4: fix wrong function name commit f355749149b2a4485792ba2bdcbc0bb4b629d726 Author: Eugene Burkov <[email protected]> Date: Sat Nov 14 01:07:22 2020 +0300 testutil: fix comments and naming commit f8c50a260bfae08d594a7f37d603941d3680a45e Author: Eugene Burkov <[email protected]> Date: Fri Nov 13 14:09:50 2020 +0300 testutil: create a package and include it commit f169cdc4084b719de65aa0cdc65200b48785322e Author: Eugene Burkov <[email protected]> Date: Thu Nov 12 20:15:58 2020 +0300 agherr: discard loggers output commit 360e736b5a2a30f2c5350448234f14b841e3ea27 Author: Eugene Burkov <[email protected]> Date: Thu Nov 12 20:09:55 2020 +0300 all: replace default log writer with ioutil.Discard Closes #2273.
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/6358240e9b0f10acdc05b470a64535df8cfcf67e
internal/dnsforward/dnsforward_test.go
"github.com/AdguardTeam/AdGuardHome/internal/testutil"
<mask> "time" <mask> <mask> "github.com/stretchr/testify/assert" <mask> ) <mask> <mask> func TestMain(m *testing.M) { <mask> testutil.DiscardLogOutput(m) </s> Pull request: 2273 clean tests output Merge in DNS/adguard-home from 2273-clean-tests-output to master Closes #2273. Squashed commit of the following: commit 7571a33fc1f76300bd256578b3afa95338e399c4 Merge: f17df0f9c a19523b25 Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 15:45:30 2020 +0300 Merge branch 'master' into 2273-clean-tests-output commit f17df0f9ce2a3ed25db33fbc6a2e7cabd33f657b Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 15:35:42 2020 +0300 home: move build constraint on top line commit 3717c8ef5a51f9dcaa7e524bfa7b0f1d90bec93d Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 15:24:50 2020 +0300 all: add improvements to changelog commit de6d5afe39d74a3c3d3e0bbe6d0e09aea0214d56 Merge: 43d4f7acf 394fc5a9d Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 15:04:38 2020 +0300 Merge branch 'master' into 2273-clean-tests-output commit 43d4f7acf188e810aa7277cb6479110c9842e8be Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 13:38:13 2020 +0300 dnsfilter: remove redundant test logging commit 7194c1413006b8f52fc454e89ab052bf52e4e517 Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 12:19:14 2020 +0300 testutil: improve comments commit 9f17ab08e287fa69ce30d9e7eec8ea8880f87716 Author: Eugene Burkov <[email protected]> Date: Sat Nov 14 01:22:08 2020 +0300 nclient4: fix wrong function name commit f355749149b2a4485792ba2bdcbc0bb4b629d726 Author: Eugene Burkov <[email protected]> Date: Sat Nov 14 01:07:22 2020 +0300 testutil: fix comments and naming commit f8c50a260bfae08d594a7f37d603941d3680a45e Author: Eugene Burkov <[email protected]> Date: Fri Nov 13 14:09:50 2020 +0300 testutil: create a package and include it commit f169cdc4084b719de65aa0cdc65200b48785322e Author: Eugene Burkov <[email protected]> Date: Thu Nov 12 20:15:58 2020 +0300 agherr: discard loggers output commit 360e736b5a2a30f2c5350448234f14b841e3ea27 Author: Eugene Burkov <[email protected]> Date: Thu Nov 12 20:09:55 2020 +0300 all: replace default log writer with ioutil.Discard Closes #2273.
[ "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/6358240e9b0f10acdc05b470a64535df8cfcf67e
internal/home/auth_test.go
func TestMain(m *testing.M) { testutil.DiscardLogOutput(m) }
<mask> ) <mask> <mask> func prepareTestDir() string { <mask> const dir = "./agh-test" <mask> _ = os.RemoveAll(dir) <mask> _ = os.MkdirAll(dir, 0755) <mask> return dir <mask> } </s> Pull request: 2273 clean tests output Merge in DNS/adguard-home from 2273-clean-tests-output to master Closes #2273. Squashed commit of the following: commit 7571a33fc1f76300bd256578b3afa95338e399c4 Merge: f17df0f9c a19523b25 Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 15:45:30 2020 +0300 Merge branch 'master' into 2273-clean-tests-output commit f17df0f9ce2a3ed25db33fbc6a2e7cabd33f657b Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 15:35:42 2020 +0300 home: move build constraint on top line commit 3717c8ef5a51f9dcaa7e524bfa7b0f1d90bec93d Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 15:24:50 2020 +0300 all: add improvements to changelog commit de6d5afe39d74a3c3d3e0bbe6d0e09aea0214d56 Merge: 43d4f7acf 394fc5a9d Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 15:04:38 2020 +0300 Merge branch 'master' into 2273-clean-tests-output commit 43d4f7acf188e810aa7277cb6479110c9842e8be Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 13:38:13 2020 +0300 dnsfilter: remove redundant test logging commit 7194c1413006b8f52fc454e89ab052bf52e4e517 Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 12:19:14 2020 +0300 testutil: improve comments commit 9f17ab08e287fa69ce30d9e7eec8ea8880f87716 Author: Eugene Burkov <[email protected]> Date: Sat Nov 14 01:22:08 2020 +0300 nclient4: fix wrong function name commit f355749149b2a4485792ba2bdcbc0bb4b629d726 Author: Eugene Burkov <[email protected]> Date: Sat Nov 14 01:07:22 2020 +0300 testutil: fix comments and naming commit f8c50a260bfae08d594a7f37d603941d3680a45e Author: Eugene Burkov <[email protected]> Date: Fri Nov 13 14:09:50 2020 +0300 testutil: create a package and include it commit f169cdc4084b719de65aa0cdc65200b48785322e Author: Eugene Burkov <[email protected]> Date: Thu Nov 12 20:15:58 2020 +0300 agherr: discard loggers output commit 360e736b5a2a30f2c5350448234f14b841e3ea27 Author: Eugene Burkov <[email protected]> Date: Thu Nov 12 20:09:55 2020 +0300 all: replace default log writer with ioutil.Discard Closes #2273.
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/6358240e9b0f10acdc05b470a64535df8cfcf67e
internal/home/auth_test.go
// TODO(e.burkov): remove this weird buildtag.
<mask> // +build !race <mask> <mask> package home <mask> <mask> import ( <mask> "context" <mask> "encoding/base64" <mask> "io/ioutil" </s> Pull request: 2273 clean tests output Merge in DNS/adguard-home from 2273-clean-tests-output to master Closes #2273. Squashed commit of the following: commit 7571a33fc1f76300bd256578b3afa95338e399c4 Merge: f17df0f9c a19523b25 Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 15:45:30 2020 +0300 Merge branch 'master' into 2273-clean-tests-output commit f17df0f9ce2a3ed25db33fbc6a2e7cabd33f657b Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 15:35:42 2020 +0300 home: move build constraint on top line commit 3717c8ef5a51f9dcaa7e524bfa7b0f1d90bec93d Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 15:24:50 2020 +0300 all: add improvements to changelog commit de6d5afe39d74a3c3d3e0bbe6d0e09aea0214d56 Merge: 43d4f7acf 394fc5a9d Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 15:04:38 2020 +0300 Merge branch 'master' into 2273-clean-tests-output commit 43d4f7acf188e810aa7277cb6479110c9842e8be Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 13:38:13 2020 +0300 dnsfilter: remove redundant test logging commit 7194c1413006b8f52fc454e89ab052bf52e4e517 Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 12:19:14 2020 +0300 testutil: improve comments commit 9f17ab08e287fa69ce30d9e7eec8ea8880f87716 Author: Eugene Burkov <[email protected]> Date: Sat Nov 14 01:22:08 2020 +0300 nclient4: fix wrong function name commit f355749149b2a4485792ba2bdcbc0bb4b629d726 Author: Eugene Burkov <[email protected]> Date: Sat Nov 14 01:07:22 2020 +0300 testutil: fix comments and naming commit f8c50a260bfae08d594a7f37d603941d3680a45e Author: Eugene Burkov <[email protected]> Date: Fri Nov 13 14:09:50 2020 +0300 testutil: create a package and include it commit f169cdc4084b719de65aa0cdc65200b48785322e Author: Eugene Burkov <[email protected]> Date: Thu Nov 12 20:15:58 2020 +0300 agherr: discard loggers output commit 360e736b5a2a30f2c5350448234f14b841e3ea27 Author: Eugene Burkov <[email protected]> Date: Thu Nov 12 20:09:55 2020 +0300 all: replace default log writer with ioutil.Discard Closes #2273.
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/6358240e9b0f10acdc05b470a64535df8cfcf67e
internal/home/home_test.go
"github.com/AdguardTeam/AdGuardHome/internal/testutil"
<mask> <mask> "github.com/AdguardTeam/AdGuardHome/internal/dnsfilter" <mask> "github.com/miekg/dns" <mask> "github.com/stretchr/testify/assert" <mask> ) <mask> <mask> func TestMain(m *testing.M) { <mask> testutil.DiscardLogOutput(m) </s> Pull request: 2273 clean tests output Merge in DNS/adguard-home from 2273-clean-tests-output to master Closes #2273. Squashed commit of the following: commit 7571a33fc1f76300bd256578b3afa95338e399c4 Merge: f17df0f9c a19523b25 Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 15:45:30 2020 +0300 Merge branch 'master' into 2273-clean-tests-output commit f17df0f9ce2a3ed25db33fbc6a2e7cabd33f657b Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 15:35:42 2020 +0300 home: move build constraint on top line commit 3717c8ef5a51f9dcaa7e524bfa7b0f1d90bec93d Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 15:24:50 2020 +0300 all: add improvements to changelog commit de6d5afe39d74a3c3d3e0bbe6d0e09aea0214d56 Merge: 43d4f7acf 394fc5a9d Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 15:04:38 2020 +0300 Merge branch 'master' into 2273-clean-tests-output commit 43d4f7acf188e810aa7277cb6479110c9842e8be Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 13:38:13 2020 +0300 dnsfilter: remove redundant test logging commit 7194c1413006b8f52fc454e89ab052bf52e4e517 Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 12:19:14 2020 +0300 testutil: improve comments commit 9f17ab08e287fa69ce30d9e7eec8ea8880f87716 Author: Eugene Burkov <[email protected]> Date: Sat Nov 14 01:22:08 2020 +0300 nclient4: fix wrong function name commit f355749149b2a4485792ba2bdcbc0bb4b629d726 Author: Eugene Burkov <[email protected]> Date: Sat Nov 14 01:07:22 2020 +0300 testutil: fix comments and naming commit f8c50a260bfae08d594a7f37d603941d3680a45e Author: Eugene Burkov <[email protected]> Date: Fri Nov 13 14:09:50 2020 +0300 testutil: create a package and include it commit f169cdc4084b719de65aa0cdc65200b48785322e Author: Eugene Burkov <[email protected]> Date: Thu Nov 12 20:15:58 2020 +0300 agherr: discard loggers output commit 360e736b5a2a30f2c5350448234f14b841e3ea27 Author: Eugene Burkov <[email protected]> Date: Thu Nov 12 20:09:55 2020 +0300 all: replace default log writer with ioutil.Discard Closes #2273.
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/6358240e9b0f10acdc05b470a64535df8cfcf67e
internal/querylog/qlog_test.go
func TestMain(m *testing.M) { testutil.DiscardLogOutput(m) }
<mask> "github.com/miekg/dns" <mask> "github.com/stretchr/testify/assert" <mask> ) <mask> <mask> func prepareTestDir() string { <mask> const dir = "./agh-test" <mask> _ = os.RemoveAll(dir) <mask> _ = os.MkdirAll(dir, 0755) </s> Pull request: 2273 clean tests output Merge in DNS/adguard-home from 2273-clean-tests-output to master Closes #2273. Squashed commit of the following: commit 7571a33fc1f76300bd256578b3afa95338e399c4 Merge: f17df0f9c a19523b25 Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 15:45:30 2020 +0300 Merge branch 'master' into 2273-clean-tests-output commit f17df0f9ce2a3ed25db33fbc6a2e7cabd33f657b Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 15:35:42 2020 +0300 home: move build constraint on top line commit 3717c8ef5a51f9dcaa7e524bfa7b0f1d90bec93d Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 15:24:50 2020 +0300 all: add improvements to changelog commit de6d5afe39d74a3c3d3e0bbe6d0e09aea0214d56 Merge: 43d4f7acf 394fc5a9d Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 15:04:38 2020 +0300 Merge branch 'master' into 2273-clean-tests-output commit 43d4f7acf188e810aa7277cb6479110c9842e8be Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 13:38:13 2020 +0300 dnsfilter: remove redundant test logging commit 7194c1413006b8f52fc454e89ab052bf52e4e517 Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 12:19:14 2020 +0300 testutil: improve comments commit 9f17ab08e287fa69ce30d9e7eec8ea8880f87716 Author: Eugene Burkov <[email protected]> Date: Sat Nov 14 01:22:08 2020 +0300 nclient4: fix wrong function name commit f355749149b2a4485792ba2bdcbc0bb4b629d726 Author: Eugene Burkov <[email protected]> Date: Sat Nov 14 01:07:22 2020 +0300 testutil: fix comments and naming commit f8c50a260bfae08d594a7f37d603941d3680a45e Author: Eugene Burkov <[email protected]> Date: Fri Nov 13 14:09:50 2020 +0300 testutil: create a package and include it commit f169cdc4084b719de65aa0cdc65200b48785322e Author: Eugene Burkov <[email protected]> Date: Thu Nov 12 20:15:58 2020 +0300 agherr: discard loggers output commit 360e736b5a2a30f2c5350448234f14b841e3ea27 Author: Eugene Burkov <[email protected]> Date: Thu Nov 12 20:09:55 2020 +0300 all: replace default log writer with ioutil.Discard Closes #2273.
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/6358240e9b0f10acdc05b470a64535df8cfcf67e
internal/querylog/qlog_test.go
"github.com/AdguardTeam/AdGuardHome/internal/testutil"
<mask> "sync/atomic" <mask> "testing" <mask> <mask> "github.com/stretchr/testify/assert" <mask> ) <mask> <mask> func TestMain(m *testing.M) { <mask> testutil.DiscardLogOutput(m) <mask> } </s> Pull request: 2273 clean tests output Merge in DNS/adguard-home from 2273-clean-tests-output to master Closes #2273. Squashed commit of the following: commit 7571a33fc1f76300bd256578b3afa95338e399c4 Merge: f17df0f9c a19523b25 Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 15:45:30 2020 +0300 Merge branch 'master' into 2273-clean-tests-output commit f17df0f9ce2a3ed25db33fbc6a2e7cabd33f657b Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 15:35:42 2020 +0300 home: move build constraint on top line commit 3717c8ef5a51f9dcaa7e524bfa7b0f1d90bec93d Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 15:24:50 2020 +0300 all: add improvements to changelog commit de6d5afe39d74a3c3d3e0bbe6d0e09aea0214d56 Merge: 43d4f7acf 394fc5a9d Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 15:04:38 2020 +0300 Merge branch 'master' into 2273-clean-tests-output commit 43d4f7acf188e810aa7277cb6479110c9842e8be Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 13:38:13 2020 +0300 dnsfilter: remove redundant test logging commit 7194c1413006b8f52fc454e89ab052bf52e4e517 Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 12:19:14 2020 +0300 testutil: improve comments commit 9f17ab08e287fa69ce30d9e7eec8ea8880f87716 Author: Eugene Burkov <[email protected]> Date: Sat Nov 14 01:22:08 2020 +0300 nclient4: fix wrong function name commit f355749149b2a4485792ba2bdcbc0bb4b629d726 Author: Eugene Burkov <[email protected]> Date: Sat Nov 14 01:07:22 2020 +0300 testutil: fix comments and naming commit f8c50a260bfae08d594a7f37d603941d3680a45e Author: Eugene Burkov <[email protected]> Date: Fri Nov 13 14:09:50 2020 +0300 testutil: create a package and include it commit f169cdc4084b719de65aa0cdc65200b48785322e Author: Eugene Burkov <[email protected]> Date: Thu Nov 12 20:15:58 2020 +0300 agherr: discard loggers output commit 360e736b5a2a30f2c5350448234f14b841e3ea27 Author: Eugene Burkov <[email protected]> Date: Thu Nov 12 20:09:55 2020 +0300 all: replace default log writer with ioutil.Discard Closes #2273.
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/6358240e9b0f10acdc05b470a64535df8cfcf67e
internal/stats/stats_test.go
func TestMain(m *testing.M) { testutil.DiscardLogOutput(m) }
<mask> ) <mask> <mask> func UIntArrayEquals(a, b []uint64) bool { <mask> if len(a) != len(b) { <mask> return false <mask> } <mask> </s> Pull request: 2273 clean tests output Merge in DNS/adguard-home from 2273-clean-tests-output to master Closes #2273. Squashed commit of the following: commit 7571a33fc1f76300bd256578b3afa95338e399c4 Merge: f17df0f9c a19523b25 Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 15:45:30 2020 +0300 Merge branch 'master' into 2273-clean-tests-output commit f17df0f9ce2a3ed25db33fbc6a2e7cabd33f657b Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 15:35:42 2020 +0300 home: move build constraint on top line commit 3717c8ef5a51f9dcaa7e524bfa7b0f1d90bec93d Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 15:24:50 2020 +0300 all: add improvements to changelog commit de6d5afe39d74a3c3d3e0bbe6d0e09aea0214d56 Merge: 43d4f7acf 394fc5a9d Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 15:04:38 2020 +0300 Merge branch 'master' into 2273-clean-tests-output commit 43d4f7acf188e810aa7277cb6479110c9842e8be Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 13:38:13 2020 +0300 dnsfilter: remove redundant test logging commit 7194c1413006b8f52fc454e89ab052bf52e4e517 Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 12:19:14 2020 +0300 testutil: improve comments commit 9f17ab08e287fa69ce30d9e7eec8ea8880f87716 Author: Eugene Burkov <[email protected]> Date: Sat Nov 14 01:22:08 2020 +0300 nclient4: fix wrong function name commit f355749149b2a4485792ba2bdcbc0bb4b629d726 Author: Eugene Burkov <[email protected]> Date: Sat Nov 14 01:07:22 2020 +0300 testutil: fix comments and naming commit f8c50a260bfae08d594a7f37d603941d3680a45e Author: Eugene Burkov <[email protected]> Date: Fri Nov 13 14:09:50 2020 +0300 testutil: create a package and include it commit f169cdc4084b719de65aa0cdc65200b48785322e Author: Eugene Burkov <[email protected]> Date: Thu Nov 12 20:15:58 2020 +0300 agherr: discard loggers output commit 360e736b5a2a30f2c5350448234f14b841e3ea27 Author: Eugene Burkov <[email protected]> Date: Thu Nov 12 20:09:55 2020 +0300 all: replace default log writer with ioutil.Discard Closes #2273. </s> remove t.Logf("IP addresses: %v", ips) </s> add
[ "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/6358240e9b0f10acdc05b470a64535df8cfcf67e
internal/stats/stats_test.go
"github.com/AdguardTeam/AdGuardHome/internal/testutil"
<mask> "os" <mask> "testing" <mask> <mask> "github.com/stretchr/testify/assert" <mask> ) <mask> <mask> func TestMain(m *testing.M) { <mask> testutil.DiscardLogOutput(m) </s> Pull request: 2273 clean tests output Merge in DNS/adguard-home from 2273-clean-tests-output to master Closes #2273. Squashed commit of the following: commit 7571a33fc1f76300bd256578b3afa95338e399c4 Merge: f17df0f9c a19523b25 Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 15:45:30 2020 +0300 Merge branch 'master' into 2273-clean-tests-output commit f17df0f9ce2a3ed25db33fbc6a2e7cabd33f657b Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 15:35:42 2020 +0300 home: move build constraint on top line commit 3717c8ef5a51f9dcaa7e524bfa7b0f1d90bec93d Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 15:24:50 2020 +0300 all: add improvements to changelog commit de6d5afe39d74a3c3d3e0bbe6d0e09aea0214d56 Merge: 43d4f7acf 394fc5a9d Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 15:04:38 2020 +0300 Merge branch 'master' into 2273-clean-tests-output commit 43d4f7acf188e810aa7277cb6479110c9842e8be Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 13:38:13 2020 +0300 dnsfilter: remove redundant test logging commit 7194c1413006b8f52fc454e89ab052bf52e4e517 Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 12:19:14 2020 +0300 testutil: improve comments commit 9f17ab08e287fa69ce30d9e7eec8ea8880f87716 Author: Eugene Burkov <[email protected]> Date: Sat Nov 14 01:22:08 2020 +0300 nclient4: fix wrong function name commit f355749149b2a4485792ba2bdcbc0bb4b629d726 Author: Eugene Burkov <[email protected]> Date: Sat Nov 14 01:07:22 2020 +0300 testutil: fix comments and naming commit f8c50a260bfae08d594a7f37d603941d3680a45e Author: Eugene Burkov <[email protected]> Date: Fri Nov 13 14:09:50 2020 +0300 testutil: create a package and include it commit f169cdc4084b719de65aa0cdc65200b48785322e Author: Eugene Burkov <[email protected]> Date: Thu Nov 12 20:15:58 2020 +0300 agherr: discard loggers output commit 360e736b5a2a30f2c5350448234f14b841e3ea27 Author: Eugene Burkov <[email protected]> Date: Thu Nov 12 20:09:55 2020 +0300 all: replace default log writer with ioutil.Discard Closes #2273.
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/6358240e9b0f10acdc05b470a64535df8cfcf67e
internal/update/update_test.go
func TestMain(m *testing.M) { testutil.DiscardLogOutput(m) }
<mask> "github.com/AdguardTeam/AdGuardHome/internal/testutil" <mask> "github.com/stretchr/testify/assert" <mask> ) <mask> <mask> func startHTTPServer(data string) (net.Listener, uint16) { <mask> mux := http.NewServeMux() <mask> mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { <mask> _, _ = w.Write([]byte(data)) <mask> }) </s> Pull request: 2273 clean tests output Merge in DNS/adguard-home from 2273-clean-tests-output to master Closes #2273. Squashed commit of the following: commit 7571a33fc1f76300bd256578b3afa95338e399c4 Merge: f17df0f9c a19523b25 Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 15:45:30 2020 +0300 Merge branch 'master' into 2273-clean-tests-output commit f17df0f9ce2a3ed25db33fbc6a2e7cabd33f657b Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 15:35:42 2020 +0300 home: move build constraint on top line commit 3717c8ef5a51f9dcaa7e524bfa7b0f1d90bec93d Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 15:24:50 2020 +0300 all: add improvements to changelog commit de6d5afe39d74a3c3d3e0bbe6d0e09aea0214d56 Merge: 43d4f7acf 394fc5a9d Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 15:04:38 2020 +0300 Merge branch 'master' into 2273-clean-tests-output commit 43d4f7acf188e810aa7277cb6479110c9842e8be Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 13:38:13 2020 +0300 dnsfilter: remove redundant test logging commit 7194c1413006b8f52fc454e89ab052bf52e4e517 Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 12:19:14 2020 +0300 testutil: improve comments commit 9f17ab08e287fa69ce30d9e7eec8ea8880f87716 Author: Eugene Burkov <[email protected]> Date: Sat Nov 14 01:22:08 2020 +0300 nclient4: fix wrong function name commit f355749149b2a4485792ba2bdcbc0bb4b629d726 Author: Eugene Burkov <[email protected]> Date: Sat Nov 14 01:07:22 2020 +0300 testutil: fix comments and naming commit f8c50a260bfae08d594a7f37d603941d3680a45e Author: Eugene Burkov <[email protected]> Date: Fri Nov 13 14:09:50 2020 +0300 testutil: create a package and include it commit f169cdc4084b719de65aa0cdc65200b48785322e Author: Eugene Burkov <[email protected]> Date: Thu Nov 12 20:15:58 2020 +0300 agherr: discard loggers output commit 360e736b5a2a30f2c5350448234f14b841e3ea27 Author: Eugene Burkov <[email protected]> Date: Thu Nov 12 20:09:55 2020 +0300 all: replace default log writer with ioutil.Discard Closes #2273. </s> remove t.Logf("IP addresses: %v", ips) </s> add
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/6358240e9b0f10acdc05b470a64535df8cfcf67e
internal/update/update_test.go
"github.com/AdguardTeam/AdGuardHome/internal/testutil"
<mask> "strings" <mask> "testing" <mask> "time" <mask> <mask> "github.com/miekg/dns" <mask> "github.com/stretchr/testify/assert" <mask> ) <mask> <mask> func TestMain(m *testing.M) { </s> Pull request: 2273 clean tests output Merge in DNS/adguard-home from 2273-clean-tests-output to master Closes #2273. Squashed commit of the following: commit 7571a33fc1f76300bd256578b3afa95338e399c4 Merge: f17df0f9c a19523b25 Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 15:45:30 2020 +0300 Merge branch 'master' into 2273-clean-tests-output commit f17df0f9ce2a3ed25db33fbc6a2e7cabd33f657b Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 15:35:42 2020 +0300 home: move build constraint on top line commit 3717c8ef5a51f9dcaa7e524bfa7b0f1d90bec93d Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 15:24:50 2020 +0300 all: add improvements to changelog commit de6d5afe39d74a3c3d3e0bbe6d0e09aea0214d56 Merge: 43d4f7acf 394fc5a9d Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 15:04:38 2020 +0300 Merge branch 'master' into 2273-clean-tests-output commit 43d4f7acf188e810aa7277cb6479110c9842e8be Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 13:38:13 2020 +0300 dnsfilter: remove redundant test logging commit 7194c1413006b8f52fc454e89ab052bf52e4e517 Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 12:19:14 2020 +0300 testutil: improve comments commit 9f17ab08e287fa69ce30d9e7eec8ea8880f87716 Author: Eugene Burkov <[email protected]> Date: Sat Nov 14 01:22:08 2020 +0300 nclient4: fix wrong function name commit f355749149b2a4485792ba2bdcbc0bb4b629d726 Author: Eugene Burkov <[email protected]> Date: Sat Nov 14 01:07:22 2020 +0300 testutil: fix comments and naming commit f8c50a260bfae08d594a7f37d603941d3680a45e Author: Eugene Burkov <[email protected]> Date: Fri Nov 13 14:09:50 2020 +0300 testutil: create a package and include it commit f169cdc4084b719de65aa0cdc65200b48785322e Author: Eugene Burkov <[email protected]> Date: Thu Nov 12 20:15:58 2020 +0300 agherr: discard loggers output commit 360e736b5a2a30f2c5350448234f14b841e3ea27 Author: Eugene Burkov <[email protected]> Date: Thu Nov 12 20:09:55 2020 +0300 all: replace default log writer with ioutil.Discard Closes #2273.
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/6358240e9b0f10acdc05b470a64535df8cfcf67e
internal/util/auto_hosts_test.go
func TestMain(m *testing.M) { testutil.DiscardLogOutput(m) }
<mask> ) <mask> <mask> func prepareTestDir() string { <mask> const dir = "./agh-test" <mask> _ = os.RemoveAll(dir) <mask> _ = os.MkdirAll(dir, 0o755) <mask> return dir <mask> } </s> Pull request: 2273 clean tests output Merge in DNS/adguard-home from 2273-clean-tests-output to master Closes #2273. Squashed commit of the following: commit 7571a33fc1f76300bd256578b3afa95338e399c4 Merge: f17df0f9c a19523b25 Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 15:45:30 2020 +0300 Merge branch 'master' into 2273-clean-tests-output commit f17df0f9ce2a3ed25db33fbc6a2e7cabd33f657b Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 15:35:42 2020 +0300 home: move build constraint on top line commit 3717c8ef5a51f9dcaa7e524bfa7b0f1d90bec93d Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 15:24:50 2020 +0300 all: add improvements to changelog commit de6d5afe39d74a3c3d3e0bbe6d0e09aea0214d56 Merge: 43d4f7acf 394fc5a9d Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 15:04:38 2020 +0300 Merge branch 'master' into 2273-clean-tests-output commit 43d4f7acf188e810aa7277cb6479110c9842e8be Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 13:38:13 2020 +0300 dnsfilter: remove redundant test logging commit 7194c1413006b8f52fc454e89ab052bf52e4e517 Author: Eugene Burkov <[email protected]> Date: Mon Nov 16 12:19:14 2020 +0300 testutil: improve comments commit 9f17ab08e287fa69ce30d9e7eec8ea8880f87716 Author: Eugene Burkov <[email protected]> Date: Sat Nov 14 01:22:08 2020 +0300 nclient4: fix wrong function name commit f355749149b2a4485792ba2bdcbc0bb4b629d726 Author: Eugene Burkov <[email protected]> Date: Sat Nov 14 01:07:22 2020 +0300 testutil: fix comments and naming commit f8c50a260bfae08d594a7f37d603941d3680a45e Author: Eugene Burkov <[email protected]> Date: Fri Nov 13 14:09:50 2020 +0300 testutil: create a package and include it commit f169cdc4084b719de65aa0cdc65200b48785322e Author: Eugene Burkov <[email protected]> Date: Thu Nov 12 20:15:58 2020 +0300 agherr: discard loggers output commit 360e736b5a2a30f2c5350448234f14b841e3ea27 Author: Eugene Burkov <[email protected]> Date: Thu Nov 12 20:09:55 2020 +0300 all: replace default log writer with ioutil.Discard Closes #2273.
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/6358240e9b0f10acdc05b470a64535df8cfcf67e
internal/util/auto_hosts_test.go
github.com/AdguardTeam/golibs v0.8.4
<mask> go 1.16 <mask> <mask> require ( <mask> github.com/AdguardTeam/dnsproxy v0.39.0 <mask> github.com/AdguardTeam/golibs v0.8.0 <mask> github.com/AdguardTeam/urlfilter v0.14.6 <mask> github.com/NYTimes/gziphandler v1.1.1 <mask> github.com/ameshkov/dnscrypt/v2 v2.2.1 <mask> github.com/digineo/go-ipset/v2 v2.2.1 <mask> github.com/fsnotify/fsnotify v1.4.9 </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove github.com/google/go-cmp v0.5.5 // indirect </s> add github.com/google/go-cmp v0.5.5 </s> remove github.com/AdguardTeam/golibs v0.8.0 h1:rHo+yIgT2fivFG0yW2Cwk/DPc2+t/Aw6QvzPpiIFre0= </s> add </s> remove github.com/AdguardTeam/dnsproxy v0.38.3 h1:DvycTEOn2wuHmY+HE5XL4EnCV2EVbpREpbgZB06IJ0I= github.com/AdguardTeam/dnsproxy v0.38.3/go.mod h1:aNXKNdTyKfgAG2OS712SYSaGIM9AasZsZxfiY4YiR/0= </s> add </s> remove github.com/ameshkov/dnscrypt/v2 v2.1.3 h1:DG4Uf7LSDg6XDj9sp3maxh3Ur26jeGQaP5MeYosn6v0= </s> add
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
go.mod
github.com/google/go-cmp v0.5.5
<mask> github.com/ameshkov/dnscrypt/v2 v2.2.1 <mask> github.com/digineo/go-ipset/v2 v2.2.1 <mask> github.com/fsnotify/fsnotify v1.4.9 <mask> github.com/go-ping/ping v0.0.0-20210506233800-ff8be3320020 <mask> github.com/google/go-cmp v0.5.5 // indirect <mask> github.com/google/renameio v1.0.1 <mask> github.com/insomniacslk/dhcp v0.0.0-20210310193751-cfd4d47082c2 <mask> github.com/kardianos/service v1.2.0 <mask> github.com/lucas-clemente/quic-go v0.21.1 <mask> github.com/mdlayher/netlink v1.4.0 </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove github.com/AdguardTeam/golibs v0.8.0 </s> add github.com/AdguardTeam/golibs v0.8.4 </s> remove github.com/ameshkov/dnscrypt/v2 v2.1.3 h1:DG4Uf7LSDg6XDj9sp3maxh3Ur26jeGQaP5MeYosn6v0= </s> add </s> remove github.com/jessevdk/go-flags v1.4.0 h1:4IU2WS7AumrZ/40jfhf4QVDMsQwqA7VEHozFRrGARJA= </s> add </s> remove leaseHosts *aghstrings.Set </s> add leaseHosts *stringutil.Set
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
go.mod
<mask> dmitri.shuralyov.com/state v0.0.0-20180228185332-28bcc343414c/go.mod h1:0PRwlb0D6DFvNNtx+9ybjezNCa8XF0xaYcETyp6rHWU= <mask> git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg= <mask> github.com/AdguardTeam/dhcp v0.0.0-20210519141215-51808c73c0bf h1:gc042VRSIRSUzZ+Px6xQCRWNJZTaPkomisDfUZmoFNk= <mask> github.com/AdguardTeam/dhcp v0.0.0-20210519141215-51808c73c0bf/go.mod h1:TKl4jN3Voofo4UJIicyNhWGp/nlQqQkFxmwIFTvBkKI= <mask> github.com/AdguardTeam/dnsproxy v0.38.3 h1:DvycTEOn2wuHmY+HE5XL4EnCV2EVbpREpbgZB06IJ0I= <mask> github.com/AdguardTeam/dnsproxy v0.38.3/go.mod h1:aNXKNdTyKfgAG2OS712SYSaGIM9AasZsZxfiY4YiR/0= <mask> github.com/AdguardTeam/dnsproxy v0.39.0 h1:5/PN2mpUeCTWtvqXUbSPTMJSOad4lJscPzm+C2f4jB4= <mask> github.com/AdguardTeam/dnsproxy v0.39.0/go.mod h1:aNXKNdTyKfgAG2OS712SYSaGIM9AasZsZxfiY4YiR/0= <mask> github.com/AdguardTeam/golibs v0.4.0/go.mod h1:skKsDKIBB7kkFflLJBpfGX+G8QFTx0WKUzB6TIgtUj4= <mask> github.com/AdguardTeam/golibs v0.4.2/go.mod h1:skKsDKIBB7kkFflLJBpfGX+G8QFTx0WKUzB6TIgtUj4= <mask> github.com/AdguardTeam/golibs v0.8.0 h1:rHo+yIgT2fivFG0yW2Cwk/DPc2+t/Aw6QvzPpiIFre0= </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove github.com/AdguardTeam/golibs v0.8.0 h1:rHo+yIgT2fivFG0yW2Cwk/DPc2+t/Aw6QvzPpiIFre0= </s> add </s> remove github.com/AdguardTeam/golibs v0.8.0 </s> add github.com/AdguardTeam/golibs v0.8.4 </s> remove id := aghstrings.Coalesce(ctx.clientID, ipStringFromAddr(d.Addr)) </s> add id := stringutil.Coalesce(ctx.clientID, ipStringFromAddr(d.Addr)) </s> remove clientIDs *aghstrings.Set, </s> add clientIDs *stringutil.Set,
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
go.sum
<mask> github.com/AdguardTeam/dnsproxy v0.39.0 h1:5/PN2mpUeCTWtvqXUbSPTMJSOad4lJscPzm+C2f4jB4= <mask> github.com/AdguardTeam/dnsproxy v0.39.0/go.mod h1:aNXKNdTyKfgAG2OS712SYSaGIM9AasZsZxfiY4YiR/0= <mask> github.com/AdguardTeam/golibs v0.4.0/go.mod h1:skKsDKIBB7kkFflLJBpfGX+G8QFTx0WKUzB6TIgtUj4= <mask> github.com/AdguardTeam/golibs v0.4.2/go.mod h1:skKsDKIBB7kkFflLJBpfGX+G8QFTx0WKUzB6TIgtUj4= <mask> github.com/AdguardTeam/golibs v0.8.0 h1:rHo+yIgT2fivFG0yW2Cwk/DPc2+t/Aw6QvzPpiIFre0= <mask> github.com/AdguardTeam/golibs v0.8.0/go.mod h1:skKsDKIBB7kkFflLJBpfGX+G8QFTx0WKUzB6TIgtUj4= <mask> github.com/AdguardTeam/gomitmproxy v0.2.0/go.mod h1:Qdv0Mktnzer5zpdpi5rAwixNJzW2FN91LjKJCkVbYGU= <mask> github.com/AdguardTeam/urlfilter v0.14.6 h1:emqoKZElooHACYehRBYENeKVN1a/rspxiqTIMYLuoIo= <mask> github.com/AdguardTeam/urlfilter v0.14.6/go.mod h1:klx4JbOfc4EaNb5lWLqOwfg+pVcyRukmoJRvO55lL5U= <mask> github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove github.com/AdguardTeam/dnsproxy v0.38.3 h1:DvycTEOn2wuHmY+HE5XL4EnCV2EVbpREpbgZB06IJ0I= github.com/AdguardTeam/dnsproxy v0.38.3/go.mod h1:aNXKNdTyKfgAG2OS712SYSaGIM9AasZsZxfiY4YiR/0= </s> add </s> remove github.com/AdguardTeam/golibs v0.8.0 </s> add github.com/AdguardTeam/golibs v0.8.4 </s> remove id := aghstrings.Coalesce(ctx.clientID, ipStringFromAddr(d.Addr)) </s> add id := stringutil.Coalesce(ctx.clientID, ipStringFromAddr(d.Addr)) </s> remove clientIDs *aghstrings.Set, </s> add clientIDs *stringutil.Set,
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
go.sum
github.com/AdguardTeam/golibs v0.8.4 h1:jd6GwvQQtfSLOKn30qisDVujvas3q7Agjm3BOEqRWpQ= github.com/AdguardTeam/golibs v0.8.4/go.mod h1:skKsDKIBB7kkFflLJBpfGX+G8QFTx0WKUzB6TIgtUj4=
<mask> github.com/AdguardTeam/golibs v0.4.0/go.mod h1:skKsDKIBB7kkFflLJBpfGX+G8QFTx0WKUzB6TIgtUj4= <mask> github.com/AdguardTeam/golibs v0.4.2/go.mod h1:skKsDKIBB7kkFflLJBpfGX+G8QFTx0WKUzB6TIgtUj4= <mask> github.com/AdguardTeam/golibs v0.8.0/go.mod h1:skKsDKIBB7kkFflLJBpfGX+G8QFTx0WKUzB6TIgtUj4= <mask> github.com/AdguardTeam/gomitmproxy v0.2.0/go.mod h1:Qdv0Mktnzer5zpdpi5rAwixNJzW2FN91LjKJCkVbYGU= <mask> github.com/AdguardTeam/urlfilter v0.14.6 h1:emqoKZElooHACYehRBYENeKVN1a/rspxiqTIMYLuoIo= <mask> github.com/AdguardTeam/urlfilter v0.14.6/go.mod h1:klx4JbOfc4EaNb5lWLqOwfg+pVcyRukmoJRvO55lL5U= <mask> github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= <mask> github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= <mask> github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cqUQ3I= </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove github.com/AdguardTeam/golibs v0.8.0 h1:rHo+yIgT2fivFG0yW2Cwk/DPc2+t/Aw6QvzPpiIFre0= </s> add </s> remove github.com/AdguardTeam/dnsproxy v0.38.3 h1:DvycTEOn2wuHmY+HE5XL4EnCV2EVbpREpbgZB06IJ0I= github.com/AdguardTeam/dnsproxy v0.38.3/go.mod h1:aNXKNdTyKfgAG2OS712SYSaGIM9AasZsZxfiY4YiR/0= </s> add </s> remove github.com/AdguardTeam/golibs v0.8.0 </s> add github.com/AdguardTeam/golibs v0.8.4 </s> remove id := aghstrings.Coalesce(ctx.clientID, ipStringFromAddr(d.Addr)) </s> add id := stringutil.Coalesce(ctx.clientID, ipStringFromAddr(d.Addr)) </s> remove clientIDs *aghstrings.Set, </s> add clientIDs *stringutil.Set,
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
go.sum
<mask> github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da h1:KjTM2ks9d14ZYCvmHS9iAKVt9AyzRSqNU1qabPih5BY= <mask> github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da/go.mod h1:eHEWzANqSiWQsof+nXEI9bUVUyV6F53Fp89EuCh2EAA= <mask> github.com/aead/poly1305 v0.0.0-20180717145839-3fee0db0b635 h1:52m0LGchQBBVqJRyYYufQuIbVqRawmubW3OFGqK1ekw= <mask> github.com/aead/poly1305 v0.0.0-20180717145839-3fee0db0b635/go.mod h1:lmLxL+FV291OopO93Bwf9fQLQeLyt33VJRUg5VJ30us= <mask> github.com/ameshkov/dnscrypt/v2 v2.1.3 h1:DG4Uf7LSDg6XDj9sp3maxh3Ur26jeGQaP5MeYosn6v0= <mask> github.com/ameshkov/dnscrypt/v2 v2.1.3/go.mod h1:+8SbPbVXpxxcUsgGi8eodkqWPo1MyNHxKYC8hDpqLSo= <mask> github.com/ameshkov/dnscrypt/v2 v2.2.1 h1:+cApRxzeBZqjUNsN26TTz7r5A8U+buON3kJgIYE3QWQ= <mask> github.com/ameshkov/dnscrypt/v2 v2.2.1/go.mod h1:+8SbPbVXpxxcUsgGi8eodkqWPo1MyNHxKYC8hDpqLSo= <mask> github.com/ameshkov/dnsstamps v1.0.1/go.mod h1:Ii3eUu73dx4Vw5O4wjzmT5+lkCwovjzaEZZ4gKyIH5A= <mask> github.com/ameshkov/dnsstamps v1.0.3 h1:Srzik+J9mivH1alRACTbys2xOxs0lRH9qnTA7Y1OYVo= </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove github.com/AdguardTeam/golibs v0.8.0 </s> add github.com/AdguardTeam/golibs v0.8.4 </s> remove github.com/google/go-cmp v0.5.5 // indirect </s> add github.com/google/go-cmp v0.5.5 </s> remove github.com/jessevdk/go-flags v1.4.0 h1:4IU2WS7AumrZ/40jfhf4QVDMsQwqA7VEHozFRrGARJA= </s> add </s> remove id := aghstrings.Coalesce(ctx.clientID, ipStringFromAddr(d.Addr)) </s> add id := stringutil.Coalesce(ctx.clientID, ipStringFromAddr(d.Addr)) </s> remove clientIDs *aghstrings.Set, </s> add clientIDs *stringutil.Set,
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
go.sum
<mask> github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= <mask> github.com/hugelgupf/socketpair v0.0.0-20190730060125-05d35a94e714 h1:/jC7qQFrv8CrSJVmaolDVOxTfS9kc36uB6H40kdbQq8= <mask> github.com/hugelgupf/socketpair v0.0.0-20190730060125-05d35a94e714/go.mod h1:2Goc3h8EklBH5mspfHFxBnEoURQCGzQQH1ga9Myjvis= <mask> github.com/jellevandenhooff/dkim v0.0.0-20150330215556-f50fe3d243e1/go.mod h1:E0B/fFc00Y+Rasa88328GlI/XbtyysCtTHZS8h7IrBU= <mask> github.com/jessevdk/go-flags v1.4.0 h1:4IU2WS7AumrZ/40jfhf4QVDMsQwqA7VEHozFRrGARJA= <mask> github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= <mask> github.com/joomcode/errorx v1.0.1/go.mod h1:kgco15ekB6cs+4Xjzo7SPeXzx38PbJzBwbnu9qfVNHQ= <mask> github.com/joomcode/errorx v1.0.3 h1:3e1mi0u7/HTPNdg6d6DYyKGBhA5l9XpsfuVE29NxnWw= <mask> github.com/joomcode/errorx v1.0.3/go.mod h1:eQzdtdlNyN7etw6YCS4W4+lu442waxZYw5yvz0ULrRo= <mask> github.com/josharian/native v0.0.0-20200817173448-b6b71def0850 h1:uhL5Gw7BINiiPAo24A2sxkcDI0Jt/sqp1v5xQCniEFA= </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove github.com/ameshkov/dnscrypt/v2 v2.1.3 h1:DG4Uf7LSDg6XDj9sp3maxh3Ur26jeGQaP5MeYosn6v0= </s> add </s> remove github.com/google/go-cmp v0.5.5 // indirect </s> add github.com/google/go-cmp v0.5.5 </s> remove make openapi-lint </s> add make VERBOSE="$verbose" openapi-lint </s> remove id := aghstrings.Coalesce(ctx.clientID, ipStringFromAddr(d.Addr)) </s> add id := stringutil.Coalesce(ctx.clientID, ipStringFromAddr(d.Addr)) </s> remove clientIDs *aghstrings.Set, </s> add clientIDs *stringutil.Set,
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
go.sum
<mask> "strings" <mask> "syscall" <mask> "time" <mask> <mask> "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" <mask> "github.com/AdguardTeam/golibs/errors" <mask> "github.com/AdguardTeam/golibs/log" <mask> ) <mask> <mask> // ErrNoStaticIPInfo is returned by IfaceHasStaticIP when no information about </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/aghnet/net.go
"github.com/AdguardTeam/golibs/stringutil"
<mask> "time" <mask> <mask> "github.com/AdguardTeam/golibs/errors" <mask> "github.com/AdguardTeam/golibs/log" <mask> ) <mask> <mask> // ErrNoStaticIPInfo is returned by IfaceHasStaticIP when no information about <mask> // the IP being static is available. </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove addrs *aghstrings.Set </s> add addrs *stringutil.Set </s> remove allTags *aghstrings.Set </s> add allTags *stringutil.Set </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/aghnet/net.go
stringutil.WriteToBuilder(b, strconv.Itoa(int(val)), dot)
<mask> if ip4 := ip.To4(); ip4 != nil { <mask> strLen, suffix = arpaV4MaxLen, arpaV4Suffix[1:] <mask> ip = ip4 <mask> writeByte = func(val byte) { <mask> aghstrings.WriteToBuilder(b, strconv.Itoa(int(val)), dot) <mask> } <mask> <mask> } else if ip6 := ip.To16(); ip6 != nil { <mask> strLen, suffix = arpaV6MaxLen, arpaV6Suffix[1:] <mask> ip = ip6 </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove aghstrings.WriteToBuilder( </s> add stringutil.WriteToBuilder( </s> remove clientIDs *aghstrings.Set, </s> add clientIDs *stringutil.Set, </s> remove d := string(data) for len(d) != 0 { s := aghstrings.SplitNext(&d, '\n') upstreams = append(upstreams, s) } </s> add upstreams = stringutil.SplitTrimmed(string(data), "\n") </s> remove s.leaseHosts = aghstrings.NewSet() </s> add s.leaseHosts = stringutil.NewSet() </s> remove id := aghstrings.Coalesce(ctx.clientID, ipStringFromAddr(d.Addr)) </s> add id := stringutil.Coalesce(ctx.clientID, ipStringFromAddr(d.Addr))
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/aghnet/net.go
stringutil.WriteToBuilder(
<mask> } else if ip6 := ip.To16(); ip6 != nil { <mask> strLen, suffix = arpaV6MaxLen, arpaV6Suffix[1:] <mask> ip = ip6 <mask> writeByte = func(val byte) { <mask> aghstrings.WriteToBuilder( <mask> b, <mask> strconv.FormatUint(uint64(val&0xF), 16), <mask> dot, <mask> strconv.FormatUint(uint64(val>>4), 16), <mask> dot, </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove aghstrings.WriteToBuilder(b, strconv.Itoa(int(val)), dot) </s> add stringutil.WriteToBuilder(b, strconv.Itoa(int(val)), dot) </s> remove clientIDs *aghstrings.Set, </s> add clientIDs *stringutil.Set, </s> remove d := string(data) for len(d) != 0 { s := aghstrings.SplitNext(&d, '\n') upstreams = append(upstreams, s) } </s> add upstreams = stringutil.SplitTrimmed(string(data), "\n") </s> remove aghstrings.WriteToBuilder( </s> add stringutil.WriteToBuilder( </s> remove s.leaseHosts = aghstrings.NewSet() </s> add s.leaseHosts = stringutil.NewSet()
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/aghnet/net.go
stringutil.WriteToBuilder(b, suffix)
<mask> b.Grow(strLen) <mask> for i := len(ip) - 1; i >= 0; i-- { <mask> writeByte(ip[i]) <mask> } <mask> aghstrings.WriteToBuilder(b, suffix) <mask> <mask> return b.String() <mask> } <mask> <mask> // CollectAllIfacesAddrs returns the slice of all network interfaces IP </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove for sourcesSet := aghstrings.NewSet(rc.initPath); i < len(sources); i++ { </s> add for sourcesSet := stringutil.NewSet(rc.initPath); i < len(sources); i++ { </s> remove ourAddrsSet := aghstrings.NewSet(ourAddrs...) </s> add ourAddrsSet := stringutil.NewSet(ourAddrs...) </s> remove return aghstrings.FilterOut(addrs, ourAddrsSet.Has), nil </s> add return stringutil.FilterOut(addrs, ourAddrsSet.Has), nil </s> remove aghstrings.WriteToBuilder(b, pcTXTSuffix) </s> add stringutil.WriteToBuilder(b, pcTXTSuffix) </s> remove aghstrings.WriteToBuilder(b, nltb, depStr) </s> add stringutil.WriteToBuilder(b, nltb, depStr)
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/aghnet/net.go
<mask> "strings" <mask> <mask> "github.com/AdguardTeam/AdGuardHome/internal/aghio" <mask> "github.com/AdguardTeam/AdGuardHome/internal/aghos" <mask> "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" <mask> "github.com/AdguardTeam/golibs/errors" <mask> "github.com/google/renameio/maybe" <mask> "golang.org/x/sys/unix" <mask> ) <mask> </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/aghnet/net_linux.go
"github.com/AdguardTeam/golibs/stringutil"
<mask> "github.com/AdguardTeam/AdGuardHome/internal/aghio" <mask> "github.com/AdguardTeam/AdGuardHome/internal/aghos" <mask> "github.com/AdguardTeam/golibs/errors" <mask> "github.com/google/renameio/maybe" <mask> "golang.org/x/sys/unix" <mask> ) <mask> <mask> // recurrentChecker is used to check all the files which may include references <mask> // for other ones. </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove for sourcesSet := aghstrings.NewSet(rc.initPath); i < len(sources); i++ { </s> add for sourcesSet := stringutil.NewSet(rc.initPath); i < len(sources); i++ { </s> remove return aghstrings.FilterOut(addrs, ourAddrsSet.Has), nil </s> add return stringutil.FilterOut(addrs, ourAddrsSet.Has), nil </s> remove ourAddrsSet := aghstrings.NewSet(ourAddrs...) </s> add ourAddrsSet := stringutil.NewSet(ourAddrs...)
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/aghnet/net_linux.go
func (rc *recurrentChecker) handlePatterns(sourcesSet *stringutil.Set, patterns []string) (
<mask> return subsources, has, nil <mask> } <mask> <mask> // handlePatterns parses the patterns and takes care of duplicates. <mask> func (rc *recurrentChecker) handlePatterns(sourcesSet *aghstrings.Set, patterns []string) ( <mask> subsources []string, <mask> err error, <mask> ) { <mask> subsources = make([]string, 0, len(patterns)) <mask> for _, p := range patterns { </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove for sourcesSet := aghstrings.NewSet(rc.initPath); i < len(sources); i++ { </s> add for sourcesSet := stringutil.NewSet(rc.initPath); i < len(sources); i++ { </s> remove clientIDs *aghstrings.Set, </s> add clientIDs *stringutil.Set, </s> remove s.leaseHosts = aghstrings.NewSet() </s> add s.leaseHosts = stringutil.NewSet() </s> remove return aghstrings.FilterOut(addrs, ourAddrsSet.Has), nil </s> add return stringutil.FilterOut(addrs, ourAddrsSet.Has), nil </s> remove ourAddrsSet := aghstrings.NewSet(ourAddrs...) </s> add ourAddrsSet := stringutil.NewSet(ourAddrs...)
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/aghnet/net_linux.go
for sourcesSet := stringutil.NewSet(rc.initPath); i < len(sources); i++ {
<mask> <mask> var patterns, subsources []string <mask> // The slice of sources is separate from the set of sources to keep the <mask> // order in which the files are walked. <mask> for sourcesSet := aghstrings.NewSet(rc.initPath); i < len(sources); i++ { <mask> patterns, has, err = rc.checkFile(sources[i], desired) <mask> if err != nil { <mask> if errors.Is(err, os.ErrNotExist) { <mask> continue <mask> } </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove ourAddrsSet := aghstrings.NewSet(ourAddrs...) </s> add ourAddrsSet := stringutil.NewSet(ourAddrs...) </s> remove func (rc *recurrentChecker) handlePatterns(sourcesSet *aghstrings.Set, patterns []string) ( </s> add func (rc *recurrentChecker) handlePatterns(sourcesSet *stringutil.Set, patterns []string) ( </s> remove aghstrings.WriteToBuilder(b, suffix) </s> add stringutil.WriteToBuilder(b, suffix) </s> remove return aghstrings.FilterOut(addrs, ourAddrsSet.Has), nil </s> add return stringutil.FilterOut(addrs, ourAddrsSet.Has), nil
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/aghnet/net_linux.go
if len(line) == 0 || line[0] == '#' {
<mask> func ifacesStaticConfig(r io.Reader, ifaceName string) (subsources []string, has bool, err error) { <mask> s := bufio.NewScanner(r) <mask> for s.Scan() { <mask> line := strings.TrimSpace(s.Text()) <mask> if aghstrings.IsCommentOrEmpty(line) { <mask> continue <mask> } <mask> <mask> // TODO(e.burkov): As man page interfaces(5) says, a line may be <mask> // extended across multiple lines by making the last character a </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove s.leaseHosts = aghstrings.NewSet() </s> add s.leaseHosts = stringutil.NewSet() </s> remove id := aghstrings.Coalesce(ctx.clientID, ipStringFromAddr(d.Addr)) </s> add id := stringutil.Coalesce(ctx.clientID, ipStringFromAddr(d.Addr)) </s> remove clientIDs *aghstrings.Set, </s> add clientIDs *stringutil.Set, </s> remove for sourcesSet := aghstrings.NewSet(rc.initPath); i < len(sources); i++ { </s> add for sourcesSet := stringutil.NewSet(rc.initPath); i < len(sources); i++ {
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/aghnet/net_linux.go
<mask> "strings" <mask> "sync" <mask> "time" <mask> <mask> "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" <mask> "github.com/AdguardTeam/golibs/errors" <mask> ) <mask> <mask> // defaultHostGen is the default method of generating host for Refresh. <mask> func defaultHostGen() (host string) { </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/aghnet/systemresolvers_others.go
"github.com/AdguardTeam/golibs/stringutil"
<mask> "time" <mask> <mask> "github.com/AdguardTeam/golibs/errors" <mask> ) <mask> <mask> // defaultHostGen is the default method of generating host for Refresh. <mask> func defaultHostGen() (host string) { </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/aghnet/systemresolvers_others.go
addrs *stringutil.Set
<mask> resolver *net.Resolver <mask> hostGenFunc HostGenFunc <mask> <mask> // addrs is the set that contains cached local resolvers' addresses. <mask> addrs *aghstrings.Set <mask> addrsLock sync.RWMutex <mask> } <mask> <mask> const ( <mask> // errBadAddrPassed is returned when dialFunc can't parse an IP address. </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove leaseHosts *aghstrings.Set </s> add leaseHosts *stringutil.Set </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove allTags *aghstrings.Set </s> add allTags *stringutil.Set
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/aghnet/systemresolvers_others.go
addrs: stringutil.NewSet(),
<mask> resolver: &net.Resolver{ <mask> PreferGo: true, <mask> }, <mask> hostGenFunc: hostGenFunc, <mask> addrs: aghstrings.NewSet(), <mask> } <mask> s.resolver.Dial = s.dialFunc <mask> <mask> return s <mask> } </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove allTags: aghstrings.NewSet(), </s> add allTags: stringutil.NewSet(), </s> remove allowedClientIDs: aghstrings.NewSet(), blockedClientIDs: aghstrings.NewSet(), </s> add allowedClientIDs: stringutil.NewSet(), blockedClientIDs: stringutil.NewSet(), </s> remove d := string(data) for len(d) != 0 { s := aghstrings.SplitNext(&d, '\n') upstreams = append(upstreams, s) } </s> add upstreams = stringutil.SplitTrimmed(string(data), "\n") </s> remove s.leaseHosts = aghstrings.NewSet() </s> add s.leaseHosts = stringutil.NewSet() </s> remove allTags: aghstrings.NewSet(), </s> add allTags: stringutil.NewSet(),
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/aghnet/systemresolvers_others.go
<mask> "sync" <mask> "time" <mask> <mask> "github.com/AdguardTeam/AdGuardHome/internal/aghnet" <mask> "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" <mask> "github.com/AdguardTeam/golibs/errors" <mask> "github.com/AdguardTeam/golibs/log" <mask> "github.com/go-ping/ping" <mask> "github.com/insomniacslk/dhcp/dhcpv4" <mask> "github.com/insomniacslk/dhcp/dhcpv4/server4" </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/dhcpd/v4.go
"github.com/AdguardTeam/golibs/stringutil"
<mask> <mask> "github.com/AdguardTeam/AdGuardHome/internal/aghnet" <mask> "github.com/AdguardTeam/golibs/errors" <mask> "github.com/AdguardTeam/golibs/log" <mask> "github.com/go-ping/ping" <mask> "github.com/insomniacslk/dhcp/dhcpv4" <mask> "github.com/insomniacslk/dhcp/dhcpv4/server4" <mask> ) <mask> </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/dhcpd/v4.go
leaseHosts *stringutil.Set
<mask> // leased. <mask> leasedOffsets *bitSet <mask> <mask> // leaseHosts is the set of all hostnames of all known DHCP clients. <mask> leaseHosts *aghstrings.Set <mask> <mask> // leases contains all dynamic and static leases. <mask> leases []*Lease <mask> <mask> // leasesLock protects leases, leaseHosts, and leasedOffsets. </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove ourAddrsSet := aghstrings.NewSet(ourAddrs...) </s> add ourAddrsSet := stringutil.NewSet(ourAddrs...) </s> remove return aghstrings.FilterOut(addrs, ourAddrsSet.Has), nil </s> add return stringutil.FilterOut(addrs, ourAddrsSet.Has), nil </s> remove addrs *aghstrings.Set </s> add addrs *stringutil.Set
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/dhcpd/v4.go
s.leaseHosts = stringutil.NewSet()
<mask> return <mask> } <mask> <mask> s.leasedOffsets = newBitSet() <mask> s.leaseHosts = aghstrings.NewSet() <mask> s.leases = nil <mask> <mask> for _, l := range leases { <mask> if !l.IsStatic() { <mask> l.Hostname = s.validHostnameForClient(l.Hostname, l.IP) </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove s.leaseHosts = aghstrings.NewSet() </s> add s.leaseHosts = stringutil.NewSet() </s> remove func (rc *recurrentChecker) handlePatterns(sourcesSet *aghstrings.Set, patterns []string) ( </s> add func (rc *recurrentChecker) handlePatterns(sourcesSet *stringutil.Set, patterns []string) ( </s> remove c.IDs = aghstrings.CloneSlice(c.IDs) c.Tags = aghstrings.CloneSlice(c.Tags) c.BlockedServices = aghstrings.CloneSlice(c.BlockedServices) c.Upstreams = aghstrings.CloneSlice(c.Upstreams) </s> add c.IDs = stringutil.CloneSlice(c.IDs) c.Tags = stringutil.CloneSlice(c.Tags) c.BlockedServices = stringutil.CloneSlice(c.BlockedServices) c.Upstreams = stringutil.CloneSlice(c.Upstreams) </s> remove aghstrings.WriteToBuilder(b, strconv.Itoa(int(val)), dot) </s> add stringutil.WriteToBuilder(b, strconv.Itoa(int(val)), dot) </s> remove d := string(data) for len(d) != 0 { s := aghstrings.SplitNext(&d, '\n') upstreams = append(upstreams, s) } </s> add upstreams = stringutil.SplitTrimmed(string(data), "\n")
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/dhcpd/v4.go
s.leaseHosts = stringutil.NewSet()
<mask> // Create DHCPv4 server <mask> func v4Create(conf V4ServerConf) (srv DHCPServer, err error) { <mask> s := &v4Server{} <mask> s.conf = conf <mask> s.leaseHosts = aghstrings.NewSet() <mask> <mask> // TODO(a.garipov): Don't use a disabled server in other places or just <mask> // use an interface. <mask> if !conf.Enabled { <mask> return s, nil </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove s.leaseHosts = aghstrings.NewSet() </s> add s.leaseHosts = stringutil.NewSet() </s> remove return aghstrings.FilterOut(addrs, ourAddrsSet.Has), nil </s> add return stringutil.FilterOut(addrs, ourAddrsSet.Has), nil </s> remove upstreams = aghstrings.FilterOut(upstreams, aghstrings.IsCommentOrEmpty) </s> add upstreams = stringutil.FilterOut(upstreams, IsCommentOrEmpty) </s> remove if aghstrings.IsCommentOrEmpty(line) { </s> add if len(line) == 0 || line[0] == '#' {
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/dhcpd/v4.go
<mask> "net/http" <mask> "strings" <mask> <mask> "github.com/AdguardTeam/AdGuardHome/internal/aghnet" <mask> "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" <mask> "github.com/AdguardTeam/golibs/log" <mask> "github.com/AdguardTeam/urlfilter" <mask> "github.com/AdguardTeam/urlfilter/filterlist" <mask> ) <mask> </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/dnsforward/access.go
"github.com/AdguardTeam/golibs/stringutil"
<mask> "github.com/AdguardTeam/AdGuardHome/internal/aghnet" <mask> "github.com/AdguardTeam/golibs/log" <mask> "github.com/AdguardTeam/urlfilter" <mask> "github.com/AdguardTeam/urlfilter/filterlist" <mask> ) <mask> <mask> // accessCtx controls IP and client blocking that takes place before all other <mask> // processing. An accessCtx is safe for concurrent use. </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove allowedClientIDs *aghstrings.Set blockedClientIDs *aghstrings.Set </s> add allowedClientIDs *stringutil.Set blockedClientIDs *stringutil.Set
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/dnsforward/access.go
allowedClientIDs *stringutil.Set blockedClientIDs *stringutil.Set
<mask> type accessCtx struct { <mask> allowedIPs *aghnet.IPMap <mask> blockedIPs *aghnet.IPMap <mask> <mask> allowedClientIDs *aghstrings.Set <mask> blockedClientIDs *aghstrings.Set <mask> <mask> blockedHostsEng *urlfilter.DNSEngine <mask> <mask> // TODO(a.garipov): Create a type for a set of IP networks. <mask> // aghnet.IPNetSet? </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove allTags *aghstrings.Set </s> add allTags *stringutil.Set </s> remove addrs *aghstrings.Set </s> add addrs *stringutil.Set </s> remove leaseHosts *aghstrings.Set </s> add leaseHosts *stringutil.Set
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/dnsforward/access.go
clientIDs *stringutil.Set,
<mask> func processAccessClients( <mask> clientStrs []string, <mask> ips *aghnet.IPMap, <mask> nets *[]*net.IPNet, <mask> clientIDs *aghstrings.Set, <mask> ) (err error) { <mask> for i, s := range clientStrs { <mask> if ip := net.ParseIP(s); ip != nil { <mask> ips.Set(ip, unit{}) <mask> } else if cidrIP, ipnet, cidrErr := net.ParseCIDR(s); cidrErr == nil { </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove aghstrings.WriteToBuilder(b, strconv.Itoa(int(val)), dot) </s> add stringutil.WriteToBuilder(b, strconv.Itoa(int(val)), dot) </s> remove aghstrings.WriteToBuilder( </s> add stringutil.WriteToBuilder( </s> remove if aghstrings.IsCommentOrEmpty(input) { </s> add if IsCommentOrEmpty(input) { </s> remove func (rc *recurrentChecker) handlePatterns(sourcesSet *aghstrings.Set, patterns []string) ( </s> add func (rc *recurrentChecker) handlePatterns(sourcesSet *stringutil.Set, patterns []string) ( </s> remove upstreams := aghstrings.FilterOut(c.Upstreams, aghstrings.IsCommentOrEmpty) </s> add upstreams := stringutil.FilterOut(c.Upstreams, dnsforward.IsCommentOrEmpty)
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/dnsforward/access.go
allowedClientIDs: stringutil.NewSet(), blockedClientIDs: stringutil.NewSet(),
<mask> a = &accessCtx{ <mask> allowedIPs: aghnet.NewIPMap(0), <mask> blockedIPs: aghnet.NewIPMap(0), <mask> <mask> allowedClientIDs: aghstrings.NewSet(), <mask> blockedClientIDs: aghstrings.NewSet(), <mask> } <mask> <mask> err = processAccessClients(allowed, a.allowedIPs, &a.allowedNets, a.allowedClientIDs) <mask> if err != nil { <mask> return nil, fmt.Errorf("adding allowed: %w", err) </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove allTags: aghstrings.NewSet(), </s> add allTags: stringutil.NewSet(), </s> remove id := aghstrings.Coalesce(ctx.clientID, ipStringFromAddr(d.Addr)) </s> add id := stringutil.Coalesce(ctx.clientID, ipStringFromAddr(d.Addr)) </s> remove allTags: aghstrings.NewSet(), </s> add allTags: stringutil.NewSet(), </s> remove d := string(data) for len(d) != 0 { s := aghstrings.SplitNext(&d, '\n') upstreams = append(upstreams, s) } </s> add upstreams = stringutil.SplitTrimmed(string(data), "\n") </s> remove upstreams := aghstrings.FilterOut(c.Upstreams, aghstrings.IsCommentOrEmpty) </s> add upstreams := stringutil.FilterOut(c.Upstreams, dnsforward.IsCommentOrEmpty)
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/dnsforward/access.go
stringutil.WriteToBuilder(b, strings.ToLower(h), "\n")
<mask> } <mask> <mask> b := &strings.Builder{} <mask> for _, h := range blockedHosts { <mask> aghstrings.WriteToBuilder(b, strings.ToLower(h), "\n") <mask> } <mask> <mask> lists := []filterlist.RuleList{ <mask> &filterlist.StringRuleList{ <mask> ID: int(0), </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove aghstrings.WriteToBuilder(b, nltb, depStr) </s> add stringutil.WriteToBuilder(b, nltb, depStr) </s> remove aghstrings.WriteToBuilder(b, m.Path) </s> add stringutil.WriteToBuilder(b, m.Path) </s> remove aghstrings.WriteToBuilder(b, nl, vFmtDepsHdr) </s> add stringutil.WriteToBuilder(b, nl, vFmtDepsHdr) </s> remove aghstrings.WriteToBuilder( </s> add stringutil.WriteToBuilder( </s> remove s.leaseHosts = aghstrings.NewSet() </s> add s.leaseHosts = stringutil.NewSet()
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/dnsforward/access.go
AllowedClients: stringutil.CloneSlice(s.conf.AllowedClients), DisallowedClients: stringutil.CloneSlice(s.conf.DisallowedClients), BlockedHosts: stringutil.CloneSlice(s.conf.BlockedHosts),
<mask> s.serverLock.RLock() <mask> defer s.serverLock.RUnlock() <mask> <mask> return accessListJSON{ <mask> AllowedClients: aghstrings.CloneSlice(s.conf.AllowedClients), <mask> DisallowedClients: aghstrings.CloneSlice(s.conf.DisallowedClients), <mask> BlockedHosts: aghstrings.CloneSlice(s.conf.BlockedHosts), <mask> } <mask> } <mask> <mask> func (s *Server) handleAccessList(w http.ResponseWriter, r *http.Request) { <mask> j := s.accessListJSON() </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove upstreams := aghstrings.CloneSliceOrEmpty(s.conf.UpstreamDNS) </s> add upstreams := stringutil.CloneSliceOrEmpty(s.conf.UpstreamDNS) </s> remove return aghstrings.CloneSlice(s.conf.LocalPTRResolvers), </s> add return stringutil.CloneSlice(s.conf.LocalPTRResolvers), </s> remove c.RatelimitWhitelist = aghstrings.CloneSlice(sc.RatelimitWhitelist) c.BootstrapDNS = aghstrings.CloneSlice(sc.BootstrapDNS) c.AllowedClients = aghstrings.CloneSlice(sc.AllowedClients) c.DisallowedClients = aghstrings.CloneSlice(sc.DisallowedClients) c.BlockedHosts = aghstrings.CloneSlice(sc.BlockedHosts) c.TrustedProxies = aghstrings.CloneSlice(sc.TrustedProxies) c.UpstreamDNS = aghstrings.CloneSlice(sc.UpstreamDNS) </s> add c.RatelimitWhitelist = stringutil.CloneSlice(sc.RatelimitWhitelist) c.BootstrapDNS = stringutil.CloneSlice(sc.BootstrapDNS) c.AllowedClients = stringutil.CloneSlice(sc.AllowedClients) c.DisallowedClients = stringutil.CloneSlice(sc.DisallowedClients) c.BlockedHosts = stringutil.CloneSlice(sc.BlockedHosts) c.TrustedProxies = stringutil.CloneSlice(sc.TrustedProxies) c.UpstreamDNS = stringutil.CloneSlice(sc.UpstreamDNS) </s> remove bootstraps := aghstrings.CloneSliceOrEmpty(s.conf.BootstrapDNS) </s> add bootstraps := stringutil.CloneSliceOrEmpty(s.conf.BootstrapDNS)
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/dnsforward/access.go
<mask> "strings" <mask> "time" <mask> <mask> "github.com/AdguardTeam/AdGuardHome/internal/aghnet" <mask> "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" <mask> "github.com/AdguardTeam/AdGuardHome/internal/filtering" <mask> "github.com/AdguardTeam/dnsproxy/proxy" <mask> "github.com/AdguardTeam/dnsproxy/upstream" <mask> "github.com/AdguardTeam/golibs/errors" <mask> "github.com/AdguardTeam/golibs/log" </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/dnsforward/config.go
"github.com/AdguardTeam/golibs/stringutil"
<mask> "github.com/AdguardTeam/dnsproxy/proxy" <mask> "github.com/AdguardTeam/dnsproxy/upstream" <mask> "github.com/AdguardTeam/golibs/errors" <mask> "github.com/AdguardTeam/golibs/log" <mask> "github.com/ameshkov/dnscrypt/v2" <mask> ) <mask> <mask> // BlockingMode is an enum of all allowed blocking modes. <mask> type BlockingMode string </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove leaseHosts *aghstrings.Set </s> add leaseHosts *stringutil.Set
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/dnsforward/config.go
upstreams = stringutil.SplitTrimmed(string(data), "\n")
<mask> data, err := os.ReadFile(s.conf.UpstreamDNSFileName) <mask> if err != nil { <mask> return err <mask> } <mask> d := string(data) <mask> for len(d) != 0 { <mask> s := aghstrings.SplitNext(&d, '\n') <mask> upstreams = append(upstreams, s) <mask> } <mask> log.Debug("dns: using %d upstream servers from file %s", len(upstreams), s.conf.UpstreamDNSFileName) <mask> } else { <mask> upstreams = s.conf.UpstreamDNS <mask> } <mask> </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove id := aghstrings.Coalesce(ctx.clientID, ipStringFromAddr(d.Addr)) </s> add id := stringutil.Coalesce(ctx.clientID, ipStringFromAddr(d.Addr)) </s> remove upstreams = aghstrings.FilterOut(upstreams, aghstrings.IsCommentOrEmpty) </s> add upstreams = stringutil.FilterOut(upstreams, IsCommentOrEmpty) </s> remove upstreams := aghstrings.FilterOut(c.Upstreams, aghstrings.IsCommentOrEmpty) </s> add upstreams := stringutil.FilterOut(c.Upstreams, dnsforward.IsCommentOrEmpty) </s> remove allowedClientIDs: aghstrings.NewSet(), blockedClientIDs: aghstrings.NewSet(), </s> add allowedClientIDs: stringutil.NewSet(), blockedClientIDs: stringutil.NewSet(), </s> remove for sourcesSet := aghstrings.NewSet(rc.initPath); i < len(sources); i++ { </s> add for sourcesSet := stringutil.NewSet(rc.initPath); i < len(sources); i++ {
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/dnsforward/config.go
upstreams = stringutil.FilterOut(upstreams, IsCommentOrEmpty)
<mask> } else { <mask> upstreams = s.conf.UpstreamDNS <mask> } <mask> <mask> upstreams = aghstrings.FilterOut(upstreams, aghstrings.IsCommentOrEmpty) <mask> upstreamConfig, err := proxy.ParseUpstreamsConfig( <mask> upstreams, <mask> &upstream.Options{ <mask> Bootstrap: s.conf.BootstrapDNS, <mask> Timeout: s.conf.UpstreamTimeout, </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove d := string(data) for len(d) != 0 { s := aghstrings.SplitNext(&d, '\n') upstreams = append(upstreams, s) } </s> add upstreams = stringutil.SplitTrimmed(string(data), "\n") </s> remove upstreams = aghstrings.FilterOut(upstreams, aghstrings.IsCommentOrEmpty) </s> add upstreams = stringutil.FilterOut(upstreams, IsCommentOrEmpty) </s> remove upstreams := aghstrings.FilterOut(c.Upstreams, aghstrings.IsCommentOrEmpty) </s> add upstreams := stringutil.FilterOut(c.Upstreams, dnsforward.IsCommentOrEmpty) </s> remove id := aghstrings.Coalesce(ctx.clientID, ipStringFromAddr(d.Addr)) </s> add id := stringutil.Coalesce(ctx.clientID, ipStringFromAddr(d.Addr)) </s> remove upstreams := aghstrings.CloneSliceOrEmpty(s.conf.UpstreamDNS) </s> add upstreams := stringutil.CloneSliceOrEmpty(s.conf.UpstreamDNS)
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/dnsforward/config.go
<mask> "strings" <mask> "time" <mask> <mask> "github.com/AdguardTeam/AdGuardHome/internal/aghnet" <mask> "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" <mask> "github.com/AdguardTeam/AdGuardHome/internal/dhcpd" <mask> "github.com/AdguardTeam/AdGuardHome/internal/filtering" <mask> "github.com/AdguardTeam/dnsproxy/proxy" <mask> "github.com/AdguardTeam/golibs/log" <mask> "github.com/miekg/dns" </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/dnsforward/dns.go
"github.com/AdguardTeam/golibs/stringutil"
<mask> "github.com/AdguardTeam/AdGuardHome/internal/filtering" <mask> "github.com/AdguardTeam/dnsproxy/proxy" <mask> "github.com/AdguardTeam/golibs/log" <mask> "github.com/miekg/dns" <mask> ) <mask> <mask> // To transfer information between modules <mask> type dnsContext struct { </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/dnsforward/dns.go
id := stringutil.Coalesce(ctx.clientID, ipStringFromAddr(d.Addr))
<mask> } <mask> <mask> if d.Addr != nil && s.conf.GetCustomUpstreamByClient != nil { <mask> // Use the clientID first, since it has a higher priority. <mask> id := aghstrings.Coalesce(ctx.clientID, ipStringFromAddr(d.Addr)) <mask> upsConf, err := s.conf.GetCustomUpstreamByClient(id) <mask> if err != nil { <mask> log.Error("dns: getting custom upstreams for client %s: %s", id, err) <mask> } else if upsConf != nil { <mask> log.Debug("dns: using custom upstreams for client %s", id) </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove d := string(data) for len(d) != 0 { s := aghstrings.SplitNext(&d, '\n') upstreams = append(upstreams, s) } </s> add upstreams = stringutil.SplitTrimmed(string(data), "\n") </s> remove upstreams := aghstrings.FilterOut(c.Upstreams, aghstrings.IsCommentOrEmpty) </s> add upstreams := stringutil.FilterOut(c.Upstreams, dnsforward.IsCommentOrEmpty) </s> remove allowedClientIDs: aghstrings.NewSet(), blockedClientIDs: aghstrings.NewSet(), </s> add allowedClientIDs: stringutil.NewSet(), blockedClientIDs: stringutil.NewSet(), </s> remove cnames := aghstrings.NewSet() </s> add cnames := stringutil.NewSet() </s> remove for sourcesSet := aghstrings.NewSet(rc.initPath); i < len(sources); i++ { </s> add for sourcesSet := stringutil.NewSet(rc.initPath); i < len(sources); i++ {
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/dnsforward/dns.go
<mask> "sync" <mask> "time" <mask> <mask> "github.com/AdguardTeam/AdGuardHome/internal/aghnet" <mask> "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" <mask> "github.com/AdguardTeam/AdGuardHome/internal/dhcpd" <mask> "github.com/AdguardTeam/AdGuardHome/internal/filtering" <mask> "github.com/AdguardTeam/AdGuardHome/internal/querylog" <mask> "github.com/AdguardTeam/AdGuardHome/internal/stats" <mask> "github.com/AdguardTeam/dnsproxy/proxy" </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/dnsforward/dnsforward.go
"github.com/AdguardTeam/golibs/stringutil"
<mask> "github.com/AdguardTeam/golibs/errors" <mask> "github.com/AdguardTeam/golibs/log" <mask> "github.com/miekg/dns" <mask> ) <mask> <mask> // DefaultTimeout is the default upstream timeout <mask> const DefaultTimeout = 10 * time.Second <mask> </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/dnsforward/dnsforward.go
c.RatelimitWhitelist = stringutil.CloneSlice(sc.RatelimitWhitelist) c.BootstrapDNS = stringutil.CloneSlice(sc.BootstrapDNS) c.AllowedClients = stringutil.CloneSlice(sc.AllowedClients) c.DisallowedClients = stringutil.CloneSlice(sc.DisallowedClients) c.BlockedHosts = stringutil.CloneSlice(sc.BlockedHosts) c.TrustedProxies = stringutil.CloneSlice(sc.TrustedProxies) c.UpstreamDNS = stringutil.CloneSlice(sc.UpstreamDNS)
<mask> defer s.serverLock.RUnlock() <mask> <mask> sc := s.conf.FilteringConfig <mask> *c = sc <mask> c.RatelimitWhitelist = aghstrings.CloneSlice(sc.RatelimitWhitelist) <mask> c.BootstrapDNS = aghstrings.CloneSlice(sc.BootstrapDNS) <mask> c.AllowedClients = aghstrings.CloneSlice(sc.AllowedClients) <mask> c.DisallowedClients = aghstrings.CloneSlice(sc.DisallowedClients) <mask> c.BlockedHosts = aghstrings.CloneSlice(sc.BlockedHosts) <mask> c.TrustedProxies = aghstrings.CloneSlice(sc.TrustedProxies) <mask> c.UpstreamDNS = aghstrings.CloneSlice(sc.UpstreamDNS) <mask> } <mask> <mask> // RDNSSettings returns the copy of actual RDNS configuration. <mask> func (s *Server) RDNSSettings() (localPTRResolvers []string, resolveClients, resolvePTR bool) { <mask> s.serverLock.RLock() </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove return aghstrings.CloneSlice(s.conf.LocalPTRResolvers), </s> add return stringutil.CloneSlice(s.conf.LocalPTRResolvers), </s> remove upstreams := aghstrings.CloneSliceOrEmpty(s.conf.UpstreamDNS) </s> add upstreams := stringutil.CloneSliceOrEmpty(s.conf.UpstreamDNS) </s> remove c.IDs = aghstrings.CloneSlice(c.IDs) c.Tags = aghstrings.CloneSlice(c.Tags) c.BlockedServices = aghstrings.CloneSlice(c.BlockedServices) c.Upstreams = aghstrings.CloneSlice(c.Upstreams) </s> add c.IDs = stringutil.CloneSlice(c.IDs) c.Tags = stringutil.CloneSlice(c.Tags) c.BlockedServices = stringutil.CloneSlice(c.BlockedServices) c.Upstreams = stringutil.CloneSlice(c.Upstreams) </s> remove AllowedClients: aghstrings.CloneSlice(s.conf.AllowedClients), DisallowedClients: aghstrings.CloneSlice(s.conf.DisallowedClients), BlockedHosts: aghstrings.CloneSlice(s.conf.BlockedHosts), </s> add AllowedClients: stringutil.CloneSlice(s.conf.AllowedClients), DisallowedClients: stringutil.CloneSlice(s.conf.DisallowedClients), BlockedHosts: stringutil.CloneSlice(s.conf.BlockedHosts), </s> remove cy.Tags = aghstrings.CloneSlice(cli.Tags) cy.IDs = aghstrings.CloneSlice(cli.IDs) cy.BlockedServices = aghstrings.CloneSlice(cli.BlockedServices) cy.Upstreams = aghstrings.CloneSlice(cli.Upstreams) </s> add cy.Tags = stringutil.CloneSlice(cli.Tags) cy.IDs = stringutil.CloneSlice(cli.IDs) cy.BlockedServices = stringutil.CloneSlice(cli.BlockedServices) cy.Upstreams = stringutil.CloneSlice(cli.Upstreams)
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/dnsforward/dnsforward.go
return stringutil.CloneSlice(s.conf.LocalPTRResolvers),
<mask> func (s *Server) RDNSSettings() (localPTRResolvers []string, resolveClients, resolvePTR bool) { <mask> s.serverLock.RLock() <mask> defer s.serverLock.RUnlock() <mask> <mask> return aghstrings.CloneSlice(s.conf.LocalPTRResolvers), <mask> s.conf.ResolveClients, <mask> s.conf.UsePrivateRDNS <mask> } <mask> <mask> // Resolve - get IP addresses by host name from an upstream server. </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove c.RatelimitWhitelist = aghstrings.CloneSlice(sc.RatelimitWhitelist) c.BootstrapDNS = aghstrings.CloneSlice(sc.BootstrapDNS) c.AllowedClients = aghstrings.CloneSlice(sc.AllowedClients) c.DisallowedClients = aghstrings.CloneSlice(sc.DisallowedClients) c.BlockedHosts = aghstrings.CloneSlice(sc.BlockedHosts) c.TrustedProxies = aghstrings.CloneSlice(sc.TrustedProxies) c.UpstreamDNS = aghstrings.CloneSlice(sc.UpstreamDNS) </s> add c.RatelimitWhitelist = stringutil.CloneSlice(sc.RatelimitWhitelist) c.BootstrapDNS = stringutil.CloneSlice(sc.BootstrapDNS) c.AllowedClients = stringutil.CloneSlice(sc.AllowedClients) c.DisallowedClients = stringutil.CloneSlice(sc.DisallowedClients) c.BlockedHosts = stringutil.CloneSlice(sc.BlockedHosts) c.TrustedProxies = stringutil.CloneSlice(sc.TrustedProxies) c.UpstreamDNS = stringutil.CloneSlice(sc.UpstreamDNS) </s> remove AllowedClients: aghstrings.CloneSlice(s.conf.AllowedClients), DisallowedClients: aghstrings.CloneSlice(s.conf.DisallowedClients), BlockedHosts: aghstrings.CloneSlice(s.conf.BlockedHosts), </s> add AllowedClients: stringutil.CloneSlice(s.conf.AllowedClients), DisallowedClients: stringutil.CloneSlice(s.conf.DisallowedClients), BlockedHosts: stringutil.CloneSlice(s.conf.BlockedHosts), </s> remove upstreams := aghstrings.CloneSliceOrEmpty(s.conf.UpstreamDNS) </s> add upstreams := stringutil.CloneSliceOrEmpty(s.conf.UpstreamDNS) </s> remove if aghstrings.IsCommentOrEmpty(input) { </s> add if IsCommentOrEmpty(input) {
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/dnsforward/dnsforward.go
ourAddrsSet := stringutil.NewSet(ourAddrs...)
<mask> if err != nil { <mask> return nil, err <mask> } <mask> <mask> ourAddrsSet := aghstrings.NewSet(ourAddrs...) <mask> <mask> // TODO(e.burkov): The approach of subtracting sets of strings is not <mask> // really applicable here since in case of listening on all network <mask> // interfaces we should check the whole interface's network to cut off <mask> // all the loopback addresses as well. </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove return aghstrings.FilterOut(addrs, ourAddrsSet.Has), nil </s> add return stringutil.FilterOut(addrs, ourAddrsSet.Has), nil </s> remove aghstrings.WriteToBuilder(b, suffix) </s> add stringutil.WriteToBuilder(b, suffix) </s> remove for sourcesSet := aghstrings.NewSet(rc.initPath); i < len(sources); i++ { </s> add for sourcesSet := stringutil.NewSet(rc.initPath); i < len(sources); i++ { </s> remove leaseHosts *aghstrings.Set </s> add leaseHosts *stringutil.Set
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/dnsforward/dnsforward.go
return stringutil.FilterOut(addrs, ourAddrsSet.Has), nil
<mask> // TODO(e.burkov): The approach of subtracting sets of strings is not <mask> // really applicable here since in case of listening on all network <mask> // interfaces we should check the whole interface's network to cut off <mask> // all the loopback addresses as well. <mask> return aghstrings.FilterOut(addrs, ourAddrsSet.Has), nil <mask> } <mask> <mask> // setupResolvers initializes the resolvers for local addresses. For internal <mask> // use only. <mask> func (s *Server) setupResolvers(localAddrs []string) (err error) { </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove ourAddrsSet := aghstrings.NewSet(ourAddrs...) </s> add ourAddrsSet := stringutil.NewSet(ourAddrs...) </s> remove aghstrings.WriteToBuilder(b, suffix) </s> add stringutil.WriteToBuilder(b, suffix) </s> remove leaseHosts *aghstrings.Set </s> add leaseHosts *stringutil.Set </s> remove for sourcesSet := aghstrings.NewSet(rc.initPath); i < len(sources); i++ { </s> add for sourcesSet := stringutil.NewSet(rc.initPath); i < len(sources); i++ {
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/dnsforward/dnsforward.go
<mask> "strings" <mask> "time" <mask> <mask> "github.com/AdguardTeam/AdGuardHome/internal/aghnet" <mask> "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" <mask> "github.com/AdguardTeam/dnsproxy/proxy" <mask> "github.com/AdguardTeam/dnsproxy/upstream" <mask> "github.com/AdguardTeam/golibs/errors" <mask> "github.com/AdguardTeam/golibs/log" <mask> "github.com/miekg/dns" </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/dnsforward/http.go
"github.com/AdguardTeam/golibs/stringutil"
<mask> "github.com/AdguardTeam/dnsproxy/upstream" <mask> "github.com/AdguardTeam/golibs/errors" <mask> "github.com/AdguardTeam/golibs/log" <mask> "github.com/miekg/dns" <mask> ) <mask> <mask> func httpError(r *http.Request, w http.ResponseWriter, code int, format string, args ...interface{}) { </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/dnsforward/http.go
upstreams := stringutil.CloneSliceOrEmpty(s.conf.UpstreamDNS)
<mask> func (s *Server) getDNSConfig() dnsConfig { <mask> s.serverLock.RLock() <mask> defer s.serverLock.RUnlock() <mask> <mask> upstreams := aghstrings.CloneSliceOrEmpty(s.conf.UpstreamDNS) <mask> upstreamFile := s.conf.UpstreamDNSFileName <mask> bootstraps := aghstrings.CloneSliceOrEmpty(s.conf.BootstrapDNS) <mask> protectionEnabled := s.conf.ProtectionEnabled <mask> blockingMode := s.conf.BlockingMode <mask> blockingIPv4 := s.conf.BlockingIPv4 </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove bootstraps := aghstrings.CloneSliceOrEmpty(s.conf.BootstrapDNS) </s> add bootstraps := stringutil.CloneSliceOrEmpty(s.conf.BootstrapDNS) </s> remove AllowedClients: aghstrings.CloneSlice(s.conf.AllowedClients), DisallowedClients: aghstrings.CloneSlice(s.conf.DisallowedClients), BlockedHosts: aghstrings.CloneSlice(s.conf.BlockedHosts), </s> add AllowedClients: stringutil.CloneSlice(s.conf.AllowedClients), DisallowedClients: stringutil.CloneSlice(s.conf.DisallowedClients), BlockedHosts: stringutil.CloneSlice(s.conf.BlockedHosts), </s> remove return aghstrings.CloneSlice(s.conf.LocalPTRResolvers), </s> add return stringutil.CloneSlice(s.conf.LocalPTRResolvers), </s> remove c.RatelimitWhitelist = aghstrings.CloneSlice(sc.RatelimitWhitelist) c.BootstrapDNS = aghstrings.CloneSlice(sc.BootstrapDNS) c.AllowedClients = aghstrings.CloneSlice(sc.AllowedClients) c.DisallowedClients = aghstrings.CloneSlice(sc.DisallowedClients) c.BlockedHosts = aghstrings.CloneSlice(sc.BlockedHosts) c.TrustedProxies = aghstrings.CloneSlice(sc.TrustedProxies) c.UpstreamDNS = aghstrings.CloneSlice(sc.UpstreamDNS) </s> add c.RatelimitWhitelist = stringutil.CloneSlice(sc.RatelimitWhitelist) c.BootstrapDNS = stringutil.CloneSlice(sc.BootstrapDNS) c.AllowedClients = stringutil.CloneSlice(sc.AllowedClients) c.DisallowedClients = stringutil.CloneSlice(sc.DisallowedClients) c.BlockedHosts = stringutil.CloneSlice(sc.BlockedHosts) c.TrustedProxies = stringutil.CloneSlice(sc.TrustedProxies) c.UpstreamDNS = stringutil.CloneSlice(sc.UpstreamDNS) </s> remove upstreams := aghstrings.FilterOut(c.Upstreams, aghstrings.IsCommentOrEmpty) </s> add upstreams := stringutil.FilterOut(c.Upstreams, dnsforward.IsCommentOrEmpty)
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/dnsforward/http.go
bootstraps := stringutil.CloneSliceOrEmpty(s.conf.BootstrapDNS)
<mask> defer s.serverLock.RUnlock() <mask> <mask> upstreams := aghstrings.CloneSliceOrEmpty(s.conf.UpstreamDNS) <mask> upstreamFile := s.conf.UpstreamDNSFileName <mask> bootstraps := aghstrings.CloneSliceOrEmpty(s.conf.BootstrapDNS) <mask> protectionEnabled := s.conf.ProtectionEnabled <mask> blockingMode := s.conf.BlockingMode <mask> blockingIPv4 := s.conf.BlockingIPv4 <mask> blockingIPv6 := s.conf.BlockingIPv6 <mask> ratelimit := s.conf.Ratelimit </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove upstreams := aghstrings.CloneSliceOrEmpty(s.conf.UpstreamDNS) </s> add upstreams := stringutil.CloneSliceOrEmpty(s.conf.UpstreamDNS) </s> remove upstreams := aghstrings.FilterOut(c.Upstreams, aghstrings.IsCommentOrEmpty) </s> add upstreams := stringutil.FilterOut(c.Upstreams, dnsforward.IsCommentOrEmpty) </s> remove d := string(data) for len(d) != 0 { s := aghstrings.SplitNext(&d, '\n') upstreams = append(upstreams, s) } </s> add upstreams = stringutil.SplitTrimmed(string(data), "\n") </s> remove localPTRUpstreams := aghstrings.CloneSliceOrEmpty(s.conf.LocalPTRResolvers) </s> add localPTRUpstreams := stringutil.CloneSliceOrEmpty(s.conf.LocalPTRResolvers) </s> remove AllowedClients: aghstrings.CloneSlice(s.conf.AllowedClients), DisallowedClients: aghstrings.CloneSlice(s.conf.DisallowedClients), BlockedHosts: aghstrings.CloneSlice(s.conf.BlockedHosts), </s> add AllowedClients: stringutil.CloneSlice(s.conf.AllowedClients), DisallowedClients: stringutil.CloneSlice(s.conf.DisallowedClients), BlockedHosts: stringutil.CloneSlice(s.conf.BlockedHosts),
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/dnsforward/http.go
localPTRUpstreams := stringutil.CloneSliceOrEmpty(s.conf.LocalPTRResolvers)
<mask> cacheMaxTTL := s.conf.CacheMaxTTL <mask> cacheOptimistic := s.conf.CacheOptimistic <mask> resolveClients := s.conf.ResolveClients <mask> usePrivateRDNS := s.conf.UsePrivateRDNS <mask> localPTRUpstreams := aghstrings.CloneSliceOrEmpty(s.conf.LocalPTRResolvers) <mask> var upstreamMode string <mask> if s.conf.FastestAddr { <mask> upstreamMode = "fastest_addr" <mask> } else if s.conf.AllServers { <mask> upstreamMode = "parallel" </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove aghstrings.WriteToBuilder(b, strconv.Itoa(int(val)), dot) </s> add stringutil.WriteToBuilder(b, strconv.Itoa(int(val)), dot) </s> remove d := string(data) for len(d) != 0 { s := aghstrings.SplitNext(&d, '\n') upstreams = append(upstreams, s) } </s> add upstreams = stringutil.SplitTrimmed(string(data), "\n") </s> remove aghstrings.WriteToBuilder(b, m.Path) </s> add stringutil.WriteToBuilder(b, m.Path) </s> remove aghstrings.WriteToBuilder( </s> add stringutil.WriteToBuilder( </s> remove upstreams = aghstrings.FilterOut(upstreams, aghstrings.IsCommentOrEmpty) </s> add upstreams = stringutil.FilterOut(upstreams, IsCommentOrEmpty)
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/dnsforward/http.go
// IsCommentOrEmpty returns true of the string starts with a "#" character or is // an empty string. This function is useful for filtering out non-upstream // lines from upstream configs. func IsCommentOrEmpty(s string) (ok bool) { return len(s) == 0 || s[0] == '#' }
<mask> PrivateUpstreams []string `json:"private_upstream"` <mask> } <mask> <mask> // ValidateUpstreams validates each upstream and returns an error if any <mask> // upstream is invalid or if there are no default upstreams specified. <mask> // <mask> // TODO(e.burkov): Move into aghnet or even into dnsproxy. <mask> func ValidateUpstreams(upstreams []string) (err error) { <mask> // No need to validate comments </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove upstreams = aghstrings.FilterOut(upstreams, aghstrings.IsCommentOrEmpty) </s> add upstreams = stringutil.FilterOut(upstreams, IsCommentOrEmpty) </s> remove if aghstrings.IsCommentOrEmpty(input) { </s> add if IsCommentOrEmpty(input) { </s> remove aghstrings.WriteToBuilder( </s> add stringutil.WriteToBuilder( </s> remove s.leaseHosts = aghstrings.NewSet() </s> add s.leaseHosts = stringutil.NewSet()
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/dnsforward/http.go
upstreams = stringutil.FilterOut(upstreams, IsCommentOrEmpty)
<mask> // <mask> // TODO(e.burkov): Move into aghnet or even into dnsproxy. <mask> func ValidateUpstreams(upstreams []string) (err error) { <mask> // No need to validate comments <mask> upstreams = aghstrings.FilterOut(upstreams, aghstrings.IsCommentOrEmpty) <mask> <mask> // Consider this case valid because defaultDNS will be used <mask> if len(upstreams) == 0 { <mask> return nil <mask> } </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove upstreams := aghstrings.FilterOut(c.Upstreams, aghstrings.IsCommentOrEmpty) </s> add upstreams := stringutil.FilterOut(c.Upstreams, dnsforward.IsCommentOrEmpty) </s> remove return aghstrings.FilterOut(addrs, ourAddrsSet.Has), nil </s> add return stringutil.FilterOut(addrs, ourAddrsSet.Has), nil </s> remove aghstrings.WriteToBuilder( </s> add stringutil.WriteToBuilder( </s> remove if aghstrings.IsCommentOrEmpty(line) { </s> add if len(line) == 0 || line[0] == '#' {
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/dnsforward/http.go
if IsCommentOrEmpty(input) {
<mask> return nil <mask> } <mask> <mask> func checkDNS(input string, bootstrap []string, timeout time.Duration, ef excFunc) (err error) { <mask> if aghstrings.IsCommentOrEmpty(input) { <mask> return nil <mask> } <mask> <mask> // Separate upstream from domains list. <mask> var useDefault bool </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove return aghstrings.CloneSlice(s.conf.LocalPTRResolvers), </s> add return stringutil.CloneSlice(s.conf.LocalPTRResolvers), </s> remove clientIDs *aghstrings.Set, </s> add clientIDs *stringutil.Set, </s> remove upstreams = aghstrings.FilterOut(upstreams, aghstrings.IsCommentOrEmpty) </s> add upstreams = stringutil.FilterOut(upstreams, IsCommentOrEmpty) </s> remove return aghstrings.FilterOut(addrs, ourAddrsSet.Has), nil </s> add return stringutil.FilterOut(addrs, ourAddrsSet.Has), nil
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/dnsforward/http.go
func TestIsCommentOrEmpty(t *testing.T) { assert.True(t, IsCommentOrEmpty("")) assert.True(t, IsCommentOrEmpty("# comment")) assert.False(t, IsCommentOrEmpty("1.2.3.4")) }
<mask> } <mask> } <mask> <mask> // TODO(a.garipov): Rewrite to check the actual error messages. <mask> func TestValidateUpstream(t *testing.T) { <mask> testCases := []struct { <mask> name string </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove ourAddrsSet := aghstrings.NewSet(ourAddrs...) </s> add ourAddrsSet := stringutil.NewSet(ourAddrs...) </s> remove return aghstrings.FilterOut(addrs, ourAddrsSet.Has), nil </s> add return stringutil.FilterOut(addrs, ourAddrsSet.Has), nil </s> remove return aghstrings.CloneSlice(s.conf.LocalPTRResolvers), </s> add return stringutil.CloneSlice(s.conf.LocalPTRResolvers),
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/dnsforward/http_test.go
<mask> "sync" <mask> "sync/atomic" <mask> <mask> "github.com/AdguardTeam/AdGuardHome/internal/aghnet" <mask> "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" <mask> "github.com/AdguardTeam/dnsproxy/upstream" <mask> "github.com/AdguardTeam/golibs/cache" <mask> "github.com/AdguardTeam/golibs/log" <mask> "github.com/AdguardTeam/urlfilter" <mask> "github.com/AdguardTeam/urlfilter/filterlist" </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/filtering/filtering.go
"github.com/AdguardTeam/golibs/stringutil"
<mask> "github.com/AdguardTeam/dnsproxy/upstream" <mask> "github.com/AdguardTeam/golibs/cache" <mask> "github.com/AdguardTeam/golibs/log" <mask> "github.com/AdguardTeam/urlfilter" <mask> "github.com/AdguardTeam/urlfilter/filterlist" <mask> "github.com/AdguardTeam/urlfilter/rules" <mask> "github.com/miekg/dns" <mask> ) <mask> </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/filtering/filtering.go
cnames := stringutil.NewSet()
<mask> if len(rr) != 0 { <mask> res.Reason = Rewritten <mask> } <mask> <mask> cnames := aghstrings.NewSet() <mask> origHost := host <mask> for len(rr) != 0 && rr[0].Type == dns.TypeCNAME { <mask> log.Debug("rewrite: CNAME for %s is %s", host, rr[0].Answer) <mask> <mask> if host == rr[0].Answer { // "host == CNAME" is an exception </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove aghstrings.WriteToBuilder(b, nl, vFmtDepsHdr) </s> add stringutil.WriteToBuilder(b, nl, vFmtDepsHdr) </s> remove upstreams := aghstrings.FilterOut(c.Upstreams, aghstrings.IsCommentOrEmpty) </s> add upstreams := stringutil.FilterOut(c.Upstreams, dnsforward.IsCommentOrEmpty) </s> remove id := aghstrings.Coalesce(ctx.clientID, ipStringFromAddr(d.Addr)) </s> add id := stringutil.Coalesce(ctx.clientID, ipStringFromAddr(d.Addr)) </s> remove d := string(data) for len(d) != 0 { s := aghstrings.SplitNext(&d, '\n') upstreams = append(upstreams, s) } </s> add upstreams = stringutil.SplitTrimmed(string(data), "\n")
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/filtering/filtering.go
<mask> "sort" <mask> "strings" <mask> "time" <mask> <mask> "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" <mask> "github.com/AdguardTeam/dnsproxy/upstream" <mask> "github.com/AdguardTeam/golibs/cache" <mask> "github.com/AdguardTeam/golibs/log" <mask> "github.com/miekg/dns" <mask> "golang.org/x/net/publicsuffix" </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/filtering/safebrowsing.go
"github.com/AdguardTeam/golibs/stringutil"
<mask> <mask> "github.com/AdguardTeam/dnsproxy/upstream" <mask> "github.com/AdguardTeam/golibs/cache" <mask> "github.com/AdguardTeam/golibs/log" <mask> "github.com/miekg/dns" <mask> "golang.org/x/net/publicsuffix" <mask> ) <mask> </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/filtering/safebrowsing.go
stringutil.WriteToBuilder(b, hex.EncodeToString(hash[0:2]), ".")
<mask> <mask> for hash := range c.hashToHost { <mask> // TODO(e.burkov, a.garipov): Find out and document why exactly <mask> // this slice. <mask> aghstrings.WriteToBuilder(b, hex.EncodeToString(hash[0:2]), ".") <mask> } <mask> <mask> if c.svc == "SafeBrowsing" { <mask> aghstrings.WriteToBuilder(b, sbTXTSuffix) <mask> </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove aghstrings.WriteToBuilder(b, sbTXTSuffix) </s> add stringutil.WriteToBuilder(b, sbTXTSuffix) </s> remove aghstrings.WriteToBuilder(b, pcTXTSuffix) </s> add stringutil.WriteToBuilder(b, pcTXTSuffix) </s> remove aghstrings.WriteToBuilder(b, nl, vFmtDepsHdr) </s> add stringutil.WriteToBuilder(b, nl, vFmtDepsHdr) </s> remove aghstrings.WriteToBuilder(b, nltb, depStr) </s> add stringutil.WriteToBuilder(b, nltb, depStr) </s> remove aghstrings.WriteToBuilder(b, strings.ToLower(h), "\n") </s> add stringutil.WriteToBuilder(b, strings.ToLower(h), "\n")
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/filtering/safebrowsing.go
stringutil.WriteToBuilder(b, sbTXTSuffix)
<mask> aghstrings.WriteToBuilder(b, hex.EncodeToString(hash[0:2]), ".") <mask> } <mask> <mask> if c.svc == "SafeBrowsing" { <mask> aghstrings.WriteToBuilder(b, sbTXTSuffix) <mask> <mask> return b.String() <mask> } <mask> <mask> aghstrings.WriteToBuilder(b, pcTXTSuffix) </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove aghstrings.WriteToBuilder(b, hex.EncodeToString(hash[0:2]), ".") </s> add stringutil.WriteToBuilder(b, hex.EncodeToString(hash[0:2]), ".") </s> remove aghstrings.WriteToBuilder(b, pcTXTSuffix) </s> add stringutil.WriteToBuilder(b, pcTXTSuffix) </s> remove aghstrings.WriteToBuilder(b, nl, vFmtDepsHdr) </s> add stringutil.WriteToBuilder(b, nl, vFmtDepsHdr) </s> remove aghstrings.WriteToBuilder(b, modInfoSumLeft, sum, modInfoSumRight) </s> add stringutil.WriteToBuilder(b, modInfoSumLeft, sum, modInfoSumRight) </s> remove aghstrings.WriteToBuilder(b, nl, vFmtRaceHdr, strconv.FormatBool(isRace)) </s> add stringutil.WriteToBuilder(b, nl, vFmtRaceHdr, strconv.FormatBool(isRace))
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/filtering/safebrowsing.go
stringutil.WriteToBuilder(b, pcTXTSuffix)
<mask> <mask> return b.String() <mask> } <mask> <mask> aghstrings.WriteToBuilder(b, pcTXTSuffix) <mask> <mask> return b.String() <mask> } <mask> <mask> // Find the target hash in TXT response </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove aghstrings.WriteToBuilder(b, sbTXTSuffix) </s> add stringutil.WriteToBuilder(b, sbTXTSuffix) </s> remove aghstrings.WriteToBuilder(b, modInfoSumLeft, sum, modInfoSumRight) </s> add stringutil.WriteToBuilder(b, modInfoSumLeft, sum, modInfoSumRight) </s> remove aghstrings.WriteToBuilder(b, suffix) </s> add stringutil.WriteToBuilder(b, suffix) </s> remove aghstrings.WriteToBuilder(b, nltb, depStr) </s> add stringutil.WriteToBuilder(b, nltb, depStr) </s> remove aghstrings.WriteToBuilder(b, hex.EncodeToString(hash[0:2]), ".") </s> add stringutil.WriteToBuilder(b, hex.EncodeToString(hash[0:2]), ".")
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/filtering/safebrowsing.go
<mask> "sync" <mask> "time" <mask> <mask> "github.com/AdguardTeam/AdGuardHome/internal/aghnet" <mask> "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" <mask> "github.com/AdguardTeam/AdGuardHome/internal/dhcpd" <mask> "github.com/AdguardTeam/AdGuardHome/internal/dnsforward" <mask> "github.com/AdguardTeam/AdGuardHome/internal/filtering" <mask> "github.com/AdguardTeam/AdGuardHome/internal/querylog" <mask> "github.com/AdguardTeam/dnsproxy/proxy" </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/home/clients.go
"github.com/AdguardTeam/golibs/stringutil"
<mask> "github.com/AdguardTeam/golibs/errors" <mask> "github.com/AdguardTeam/golibs/log" <mask> ) <mask> <mask> const clientsUpdatePeriod = 10 * time.Minute <mask> <mask> var webHandlersRegistered = false <mask> </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove var allowedLanguages = aghstrings.NewSet( </s> add var allowedLanguages = stringutil.NewSet(
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/home/clients.go
allTags *stringutil.Set
<mask> ipToRC *aghnet.IPMap <mask> <mask> lock sync.Mutex <mask> <mask> allTags *aghstrings.Set <mask> <mask> // dhcpServer is used for looking up clients IP addresses by MAC addresses <mask> dhcpServer *dhcpd.Server <mask> <mask> // dnsServer is used for checking clients IP status access list status </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove allowedClientIDs *aghstrings.Set blockedClientIDs *aghstrings.Set </s> add allowedClientIDs *stringutil.Set blockedClientIDs *stringutil.Set </s> remove return aghstrings.CloneSlice(s.conf.LocalPTRResolvers), </s> add return stringutil.CloneSlice(s.conf.LocalPTRResolvers), </s> remove addrs *aghstrings.Set </s> add addrs *stringutil.Set
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/home/clients.go
clients.allTags = stringutil.NewSet(clientTags...)
<mask> clients.list = make(map[string]*Client) <mask> clients.idIndex = make(map[string]*Client) <mask> clients.ipToRC = aghnet.NewIPMap(0) <mask> <mask> clients.allTags = aghstrings.NewSet(clientTags...) <mask> <mask> clients.dhcpServer = dhcpServer <mask> clients.etcHosts = etcHosts <mask> clients.addFromConfig(objects) <mask> </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove cy.Tags = aghstrings.CloneSlice(cli.Tags) cy.IDs = aghstrings.CloneSlice(cli.IDs) cy.BlockedServices = aghstrings.CloneSlice(cli.BlockedServices) cy.Upstreams = aghstrings.CloneSlice(cli.Upstreams) </s> add cy.Tags = stringutil.CloneSlice(cli.Tags) cy.IDs = stringutil.CloneSlice(cli.IDs) cy.BlockedServices = stringutil.CloneSlice(cli.BlockedServices) cy.Upstreams = stringutil.CloneSlice(cli.Upstreams) </s> remove c.RatelimitWhitelist = aghstrings.CloneSlice(sc.RatelimitWhitelist) c.BootstrapDNS = aghstrings.CloneSlice(sc.BootstrapDNS) c.AllowedClients = aghstrings.CloneSlice(sc.AllowedClients) c.DisallowedClients = aghstrings.CloneSlice(sc.DisallowedClients) c.BlockedHosts = aghstrings.CloneSlice(sc.BlockedHosts) c.TrustedProxies = aghstrings.CloneSlice(sc.TrustedProxies) c.UpstreamDNS = aghstrings.CloneSlice(sc.UpstreamDNS) </s> add c.RatelimitWhitelist = stringutil.CloneSlice(sc.RatelimitWhitelist) c.BootstrapDNS = stringutil.CloneSlice(sc.BootstrapDNS) c.AllowedClients = stringutil.CloneSlice(sc.AllowedClients) c.DisallowedClients = stringutil.CloneSlice(sc.DisallowedClients) c.BlockedHosts = stringutil.CloneSlice(sc.BlockedHosts) c.TrustedProxies = stringutil.CloneSlice(sc.TrustedProxies) c.UpstreamDNS = stringutil.CloneSlice(sc.UpstreamDNS) </s> remove v = aghstrings.Coalesce(orgname, v) </s> add v = stringutil.Coalesce(orgname, v) </s> remove s.leaseHosts = aghstrings.NewSet() </s> add s.leaseHosts = stringutil.NewSet() </s> remove c.IDs = aghstrings.CloneSlice(c.IDs) c.Tags = aghstrings.CloneSlice(c.Tags) c.BlockedServices = aghstrings.CloneSlice(c.BlockedServices) c.Upstreams = aghstrings.CloneSlice(c.Upstreams) </s> add c.IDs = stringutil.CloneSlice(c.IDs) c.Tags = stringutil.CloneSlice(c.Tags) c.BlockedServices = stringutil.CloneSlice(c.BlockedServices) c.Upstreams = stringutil.CloneSlice(c.Upstreams)
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/home/clients.go
cy.Tags = stringutil.CloneSlice(cli.Tags) cy.IDs = stringutil.CloneSlice(cli.IDs) cy.BlockedServices = stringutil.CloneSlice(cli.BlockedServices) cy.Upstreams = stringutil.CloneSlice(cli.Upstreams)
<mask> SafeBrowsingEnabled: cli.SafeBrowsingEnabled, <mask> UseGlobalBlockedServices: !cli.UseOwnBlockedServices, <mask> } <mask> <mask> cy.Tags = aghstrings.CloneSlice(cli.Tags) <mask> cy.IDs = aghstrings.CloneSlice(cli.IDs) <mask> cy.BlockedServices = aghstrings.CloneSlice(cli.BlockedServices) <mask> cy.Upstreams = aghstrings.CloneSlice(cli.Upstreams) <mask> <mask> *objects = append(*objects, cy) <mask> } <mask> clients.lock.Unlock() <mask> } </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove c.RatelimitWhitelist = aghstrings.CloneSlice(sc.RatelimitWhitelist) c.BootstrapDNS = aghstrings.CloneSlice(sc.BootstrapDNS) c.AllowedClients = aghstrings.CloneSlice(sc.AllowedClients) c.DisallowedClients = aghstrings.CloneSlice(sc.DisallowedClients) c.BlockedHosts = aghstrings.CloneSlice(sc.BlockedHosts) c.TrustedProxies = aghstrings.CloneSlice(sc.TrustedProxies) c.UpstreamDNS = aghstrings.CloneSlice(sc.UpstreamDNS) </s> add c.RatelimitWhitelist = stringutil.CloneSlice(sc.RatelimitWhitelist) c.BootstrapDNS = stringutil.CloneSlice(sc.BootstrapDNS) c.AllowedClients = stringutil.CloneSlice(sc.AllowedClients) c.DisallowedClients = stringutil.CloneSlice(sc.DisallowedClients) c.BlockedHosts = stringutil.CloneSlice(sc.BlockedHosts) c.TrustedProxies = stringutil.CloneSlice(sc.TrustedProxies) c.UpstreamDNS = stringutil.CloneSlice(sc.UpstreamDNS) </s> remove clients.allTags = aghstrings.NewSet(clientTags...) </s> add clients.allTags = stringutil.NewSet(clientTags...) </s> remove s.leaseHosts = aghstrings.NewSet() </s> add s.leaseHosts = stringutil.NewSet() </s> remove c.IDs = aghstrings.CloneSlice(c.IDs) c.Tags = aghstrings.CloneSlice(c.Tags) c.BlockedServices = aghstrings.CloneSlice(c.BlockedServices) c.Upstreams = aghstrings.CloneSlice(c.Upstreams) </s> add c.IDs = stringutil.CloneSlice(c.IDs) c.Tags = stringutil.CloneSlice(c.Tags) c.BlockedServices = stringutil.CloneSlice(c.BlockedServices) c.Upstreams = stringutil.CloneSlice(c.Upstreams) </s> remove v = aghstrings.Coalesce(orgname, v) </s> add v = stringutil.Coalesce(orgname, v)
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/home/clients.go
c.IDs = stringutil.CloneSlice(c.IDs) c.Tags = stringutil.CloneSlice(c.Tags) c.BlockedServices = stringutil.CloneSlice(c.BlockedServices) c.Upstreams = stringutil.CloneSlice(c.Upstreams)
<mask> if !ok { <mask> return nil, false <mask> } <mask> <mask> c.IDs = aghstrings.CloneSlice(c.IDs) <mask> c.Tags = aghstrings.CloneSlice(c.Tags) <mask> c.BlockedServices = aghstrings.CloneSlice(c.BlockedServices) <mask> c.Upstreams = aghstrings.CloneSlice(c.Upstreams) <mask> return c, true <mask> } <mask> <mask> // findUpstreams returns upstreams configured for the client, identified either <mask> // by its IP address or its ClientID. upsConf is nil if the client isn't found </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove upstreams := aghstrings.FilterOut(c.Upstreams, aghstrings.IsCommentOrEmpty) </s> add upstreams := stringutil.FilterOut(c.Upstreams, dnsforward.IsCommentOrEmpty) </s> remove id := aghstrings.Coalesce(ctx.clientID, ipStringFromAddr(d.Addr)) </s> add id := stringutil.Coalesce(ctx.clientID, ipStringFromAddr(d.Addr)) </s> remove upstreams = aghstrings.FilterOut(upstreams, aghstrings.IsCommentOrEmpty) </s> add upstreams = stringutil.FilterOut(upstreams, IsCommentOrEmpty) </s> remove s.leaseHosts = aghstrings.NewSet() </s> add s.leaseHosts = stringutil.NewSet()
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/home/clients.go
upstreams := stringutil.FilterOut(c.Upstreams, dnsforward.IsCommentOrEmpty)
<mask> if !ok { <mask> return nil, nil <mask> } <mask> <mask> upstreams := aghstrings.FilterOut(c.Upstreams, aghstrings.IsCommentOrEmpty) <mask> if len(upstreams) == 0 { <mask> return nil, nil <mask> } <mask> <mask> if c.upstreamConfig != nil { </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove upstreams = aghstrings.FilterOut(upstreams, aghstrings.IsCommentOrEmpty) </s> add upstreams = stringutil.FilterOut(upstreams, IsCommentOrEmpty) </s> remove allowedClientIDs: aghstrings.NewSet(), blockedClientIDs: aghstrings.NewSet(), </s> add allowedClientIDs: stringutil.NewSet(), blockedClientIDs: stringutil.NewSet(), </s> remove c.IDs = aghstrings.CloneSlice(c.IDs) c.Tags = aghstrings.CloneSlice(c.Tags) c.BlockedServices = aghstrings.CloneSlice(c.BlockedServices) c.Upstreams = aghstrings.CloneSlice(c.Upstreams) </s> add c.IDs = stringutil.CloneSlice(c.IDs) c.Tags = stringutil.CloneSlice(c.Tags) c.BlockedServices = stringutil.CloneSlice(c.BlockedServices) c.Upstreams = stringutil.CloneSlice(c.Upstreams) </s> remove d := string(data) for len(d) != 0 { s := aghstrings.SplitNext(&d, '\n') upstreams = append(upstreams, s) } </s> add upstreams = stringutil.SplitTrimmed(string(data), "\n") </s> remove id := aghstrings.Coalesce(ctx.clientID, ipStringFromAddr(d.Addr)) </s> add id := stringutil.Coalesce(ctx.clientID, ipStringFromAddr(d.Addr))
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/home/clients.go
<mask> "io" <mask> "net/http" <mask> "strings" <mask> <mask> "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" <mask> "github.com/AdguardTeam/golibs/log" <mask> ) <mask> <mask> // TODO(a.garipov): Get rid of a global variable? <mask> var allowedLanguages = aghstrings.NewSet( </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove var allowedLanguages = aghstrings.NewSet( </s> add var allowedLanguages = stringutil.NewSet( </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/home/i18n.go
"github.com/AdguardTeam/golibs/stringutil"
<mask> <mask> "github.com/AdguardTeam/golibs/log" <mask> ) <mask> <mask> // TODO(a.garipov): Get rid of a global variable? <mask> var allowedLanguages = stringutil.NewSet( <mask> "be", <mask> "bg", </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove var allowedLanguages = aghstrings.NewSet( </s> add var allowedLanguages = stringutil.NewSet( </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove allowedClientIDs *aghstrings.Set blockedClientIDs *aghstrings.Set </s> add allowedClientIDs *stringutil.Set blockedClientIDs *stringutil.Set
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/home/i18n.go
var allowedLanguages = stringutil.NewSet(
<mask> "github.com/AdguardTeam/golibs/log" <mask> ) <mask> <mask> // TODO(a.garipov): Get rid of a global variable? <mask> var allowedLanguages = aghstrings.NewSet( <mask> "be", <mask> "bg", <mask> "cs", <mask> "da", <mask> "de", </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove allowedClientIDs *aghstrings.Set blockedClientIDs *aghstrings.Set </s> add allowedClientIDs *stringutil.Set blockedClientIDs *stringutil.Set
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/home/i18n.go
<mask> "testing" <mask> "time" <mask> <mask> "github.com/AdguardTeam/AdGuardHome/internal/aghnet" <mask> "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" <mask> "github.com/AdguardTeam/AdGuardHome/internal/aghtest" <mask> "github.com/AdguardTeam/dnsproxy/upstream" <mask> "github.com/AdguardTeam/golibs/cache" <mask> "github.com/AdguardTeam/golibs/errors" <mask> "github.com/AdguardTeam/golibs/log" </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/home/rdns_test.go
"github.com/AdguardTeam/golibs/stringutil"
<mask> "github.com/AdguardTeam/golibs/errors" <mask> "github.com/AdguardTeam/golibs/log" <mask> "github.com/miekg/dns" <mask> "github.com/stretchr/testify/assert" <mask> "github.com/stretchr/testify/require" <mask> ) </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/home/rdns_test.go
allTags: stringutil.NewSet(),
<mask> clients: &clientsContainer{ <mask> list: map[string]*Client{}, <mask> idIndex: tc.cliIDIndex, <mask> ipToRC: aghnet.NewIPMap(0), <mask> allTags: aghstrings.NewSet(), <mask> }, <mask> } <mask> ipCache.Clear() <mask> ipCache.Set(net.IP{1, 2, 3, 4}, ttl) <mask> </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove allTags: aghstrings.NewSet(), </s> add allTags: stringutil.NewSet(), </s> remove allowedClientIDs: aghstrings.NewSet(), blockedClientIDs: aghstrings.NewSet(), </s> add allowedClientIDs: stringutil.NewSet(), blockedClientIDs: stringutil.NewSet(), </s> remove addrs: aghstrings.NewSet(), </s> add addrs: stringutil.NewSet(), </s> remove aghstrings.WriteToBuilder(b, modInfoSumLeft, sum, modInfoSumRight) </s> add stringutil.WriteToBuilder(b, modInfoSumLeft, sum, modInfoSumRight) </s> remove aghstrings.WriteToBuilder(b, nltb, depStr) </s> add stringutil.WriteToBuilder(b, nltb, depStr)
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/home/rdns_test.go
allTags: stringutil.NewSet(),
<mask> cc := &clientsContainer{ <mask> list: map[string]*Client{}, <mask> idIndex: map[string]*Client{}, <mask> ipToRC: aghnet.NewIPMap(0), <mask> allTags: aghstrings.NewSet(), <mask> } <mask> ch := make(chan net.IP) <mask> rdns := &RDNS{ <mask> exchanger: &rDNSExchanger{ <mask> ex: aghtest.Exchanger{ </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove allTags: aghstrings.NewSet(), </s> add allTags: stringutil.NewSet(), </s> remove allowedClientIDs: aghstrings.NewSet(), blockedClientIDs: aghstrings.NewSet(), </s> add allowedClientIDs: stringutil.NewSet(), blockedClientIDs: stringutil.NewSet(), </s> remove bootstraps := aghstrings.CloneSliceOrEmpty(s.conf.BootstrapDNS) </s> add bootstraps := stringutil.CloneSliceOrEmpty(s.conf.BootstrapDNS) </s> remove upstreams := aghstrings.CloneSliceOrEmpty(s.conf.UpstreamDNS) </s> add upstreams := stringutil.CloneSliceOrEmpty(s.conf.UpstreamDNS) </s> remove localPTRUpstreams := aghstrings.CloneSliceOrEmpty(s.conf.LocalPTRResolvers) </s> add localPTRUpstreams := stringutil.CloneSliceOrEmpty(s.conf.LocalPTRResolvers)
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/home/rdns_test.go
<mask> "fmt" <mask> "net/http" <mask> "os" <mask> "path/filepath" <mask> "reflect" <mask> "runtime" <mask> "strings" <mask> "sync" <mask> "time" <mask> </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/home/tls.go
"github.com/google/go-cmp/cmp"
<mask> <mask> "github.com/AdguardTeam/golibs/errors" <mask> "github.com/AdguardTeam/golibs/log" <mask> "golang.org/x/sys/cpu" <mask> ) <mask> <mask> var tlsWebHandlersRegistered = false </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove var allowedLanguages = aghstrings.NewSet( </s> add var allowedLanguages = stringutil.NewSet( </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/home/tls.go
if !cmp.Equal(t.conf, data) {
<mask> } <mask> status = validateCertificates(string(data.CertificateChainData), string(data.PrivateKeyData), data.ServerName) <mask> restartHTTPS := false <mask> t.confLock.Lock() <mask> if !reflect.DeepEqual(t.conf, data) { <mask> log.Printf("tls config settings have changed, will restart HTTPS server") <mask> restartHTTPS = true <mask> } <mask> // Note: don't do just `t.conf = data` because we must preserve all other members of t.conf <mask> t.conf.Enabled = data.Enabled </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove c.IDs = aghstrings.CloneSlice(c.IDs) c.Tags = aghstrings.CloneSlice(c.Tags) c.BlockedServices = aghstrings.CloneSlice(c.BlockedServices) c.Upstreams = aghstrings.CloneSlice(c.Upstreams) </s> add c.IDs = stringutil.CloneSlice(c.IDs) c.Tags = stringutil.CloneSlice(c.Tags) c.BlockedServices = stringutil.CloneSlice(c.BlockedServices) c.Upstreams = stringutil.CloneSlice(c.Upstreams) </s> remove s.leaseHosts = aghstrings.NewSet() </s> add s.leaseHosts = stringutil.NewSet() </s> remove upstreams = aghstrings.FilterOut(upstreams, aghstrings.IsCommentOrEmpty) </s> add upstreams = stringutil.FilterOut(upstreams, IsCommentOrEmpty)
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/home/tls.go
<mask> "strings" <mask> "time" <mask> <mask> "github.com/AdguardTeam/AdGuardHome/internal/aghio" <mask> "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" <mask> "github.com/AdguardTeam/golibs/cache" <mask> "github.com/AdguardTeam/golibs/errors" <mask> "github.com/AdguardTeam/golibs/log" <mask> ) <mask> </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/home/whois.go
"github.com/AdguardTeam/golibs/stringutil"
<mask> "github.com/AdguardTeam/AdGuardHome/internal/aghio" <mask> "github.com/AdguardTeam/golibs/cache" <mask> "github.com/AdguardTeam/golibs/errors" <mask> "github.com/AdguardTeam/golibs/log" <mask> ) <mask> <mask> const ( <mask> defaultServer = "whois.arin.net" <mask> defaultPort = "43" </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add "github.com/AdguardTeam/golibs/stringutil" </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/home/whois.go
v = stringutil.Coalesce(orgname, v)
<mask> case "city", "country": <mask> v = trimValue(v) <mask> case "descr", "netname": <mask> k = "orgname" <mask> v = aghstrings.Coalesce(orgname, v) <mask> orgname = v <mask> case "whois": <mask> k = "whois" <mask> case "referralserver": <mask> k = "whois" </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove upstreams = aghstrings.FilterOut(upstreams, aghstrings.IsCommentOrEmpty) </s> add upstreams = stringutil.FilterOut(upstreams, IsCommentOrEmpty) </s> remove if !aghstrings.InSlice(filteringStatusValues, val) { </s> add if !stringutil.InSlice(filteringStatusValues, val) { </s> remove clients.allTags = aghstrings.NewSet(clientTags...) </s> add clients.allTags = stringutil.NewSet(clientTags...) </s> remove cy.Tags = aghstrings.CloneSlice(cli.Tags) cy.IDs = aghstrings.CloneSlice(cli.IDs) cy.BlockedServices = aghstrings.CloneSlice(cli.BlockedServices) cy.Upstreams = aghstrings.CloneSlice(cli.Upstreams) </s> add cy.Tags = stringutil.CloneSlice(cli.Tags) cy.IDs = stringutil.CloneSlice(cli.IDs) cy.BlockedServices = stringutil.CloneSlice(cli.BlockedServices) cy.Upstreams = stringutil.CloneSlice(cli.Upstreams) </s> remove c.RatelimitWhitelist = aghstrings.CloneSlice(sc.RatelimitWhitelist) c.BootstrapDNS = aghstrings.CloneSlice(sc.BootstrapDNS) c.AllowedClients = aghstrings.CloneSlice(sc.AllowedClients) c.DisallowedClients = aghstrings.CloneSlice(sc.DisallowedClients) c.BlockedHosts = aghstrings.CloneSlice(sc.BlockedHosts) c.TrustedProxies = aghstrings.CloneSlice(sc.TrustedProxies) c.UpstreamDNS = aghstrings.CloneSlice(sc.UpstreamDNS) </s> add c.RatelimitWhitelist = stringutil.CloneSlice(sc.RatelimitWhitelist) c.BootstrapDNS = stringutil.CloneSlice(sc.BootstrapDNS) c.AllowedClients = stringutil.CloneSlice(sc.AllowedClients) c.DisallowedClients = stringutil.CloneSlice(sc.DisallowedClients) c.BlockedHosts = stringutil.CloneSlice(sc.BlockedHosts) c.TrustedProxies = stringutil.CloneSlice(sc.TrustedProxies) c.UpstreamDNS = stringutil.CloneSlice(sc.UpstreamDNS)
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/home/whois.go
<mask> "strconv" <mask> "strings" <mask> "time" <mask> <mask> "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" <mask> "github.com/AdguardTeam/golibs/jsonutil" <mask> "github.com/AdguardTeam/golibs/log" <mask> "golang.org/x/net/idna" <mask> ) <mask> </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add "github.com/AdguardTeam/golibs/stringutil" </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/querylog/http.go
"github.com/AdguardTeam/golibs/stringutil"
<mask> "github.com/AdguardTeam/golibs/jsonutil" <mask> "github.com/AdguardTeam/golibs/log" <mask> "golang.org/x/net/idna" <mask> ) <mask> <mask> type qlogConfig struct { <mask> Enabled bool `json:"enabled"` <mask> // Use float64 here to support fractional numbers and not mess the API </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove ourAddrsSet := aghstrings.NewSet(ourAddrs...) </s> add ourAddrsSet := stringutil.NewSet(ourAddrs...) </s> remove allowedClientIDs *aghstrings.Set blockedClientIDs *aghstrings.Set </s> add allowedClientIDs *stringutil.Set blockedClientIDs *stringutil.Set </s> remove return aghstrings.FilterOut(addrs, ourAddrsSet.Has), nil </s> add return stringutil.FilterOut(addrs, ourAddrsSet.Has), nil
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/querylog/http.go
if !stringutil.InSlice(filteringStatusValues, val) {
<mask> // twice. <mask> asciiVal = "" <mask> } <mask> case ctFilteringStatus: <mask> if !aghstrings.InSlice(filteringStatusValues, val) { <mask> return false, sc, fmt.Errorf("invalid value %s", val) <mask> } <mask> default: <mask> return false, sc, fmt.Errorf( <mask> "invalid criterion type %v: should be one of %v", </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove ourAddrsSet := aghstrings.NewSet(ourAddrs...) </s> add ourAddrsSet := stringutil.NewSet(ourAddrs...) </s> remove upstreams = aghstrings.FilterOut(upstreams, aghstrings.IsCommentOrEmpty) </s> add upstreams = stringutil.FilterOut(upstreams, IsCommentOrEmpty) </s> remove return aghstrings.FilterOut(addrs, ourAddrsSet.Has), nil </s> add return stringutil.FilterOut(addrs, ourAddrsSet.Has), nil </s> remove v = aghstrings.Coalesce(orgname, v) </s> add v = stringutil.Coalesce(orgname, v) </s> remove d := string(data) for len(d) != 0 { s := aghstrings.SplitNext(&d, '\n') upstreams = append(upstreams, s) } </s> add upstreams = stringutil.SplitTrimmed(string(data), "\n")
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/querylog/http.go
"github.com/AdguardTeam/golibs/stringutil"
<mask> "runtime/debug" <mask> "strconv" <mask> "strings" <mask> <mask> "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" <mask> ) <mask> <mask> // Channel constants. <mask> const ( <mask> ChannelDevelopment = "development" </s> Pull request: all: replace aghstrings with stringutil Merge in DNS/adguard-home from add-stringutil to master Squashed commit of the following: commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15 Author: Ainar Garipov <[email protected]> Date: Thu Jul 29 17:29:25 2021 +0300 all: replace aghstrings with stringutil </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings" </s> add
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
internal/version/version.go