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 <A.Garipov@AdGuard.COM>
Date:   Thu Jul 29 17:29:25 2021 +0300

    all: replace aghstrings with stringutil
This commit is contained in:
Ainar Garipov
2021-07-29 17:40:31 +03:00
parent 0030e31e33
commit 63ee95dfbe
27 changed files with 142 additions and 478 deletions

View File

@@ -241,6 +241,12 @@ func TestDNSForwardHTTP_handleSetConfig(t *testing.T) {
}
}
func TestIsCommentOrEmpty(t *testing.T) {
assert.True(t, IsCommentOrEmpty(""))
assert.True(t, IsCommentOrEmpty("# comment"))
assert.False(t, IsCommentOrEmpty("1.2.3.4"))
}
// TODO(a.garipov): Rewrite to check the actual error messages.
func TestValidateUpstream(t *testing.T) {
testCases := []struct {