Pull request: all: fix client custom upstream comments
Updates #2947. Squashed commit of the following: commit 498a05459b1aa00bcffee490acfeecb567025971 Merge: 6a7a2f8721e2c419Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Tue Apr 13 13:40:29 2021 +0300 Merge branch 'master' into 2947-cli-ups-comment commit 6a7a2f87cfd2bdd829b82889890511fef8d84b9b Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Tue Apr 13 13:34:28 2021 +0300 all: imp code, tests commit abc0be239f69cfc3e7d0cde2fc952d9157b2cd5d Merge: 82fb3fcb6410feebAuthor: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Tue Apr 13 13:17:09 2021 +0300 Merge branch 'master' into 2947-cli-ups-comment commit 82fb3fcb49cbc8d439cb5959c1cb84ae49b2257e Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Mon Apr 12 22:13:41 2021 +0300 all: fix client custom upstream comments
This commit is contained in:
@@ -67,18 +67,3 @@ func matchDNSName(dnsNames []string, sni string) bool {
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// Is not comment
|
||||
func isUpstream(line string) bool {
|
||||
return !strings.HasPrefix(line, "#")
|
||||
}
|
||||
|
||||
func filterOutComments(lines []string) []string {
|
||||
var filtered []string
|
||||
for _, l := range lines {
|
||||
if isUpstream(l) {
|
||||
filtered = append(filtered, l)
|
||||
}
|
||||
}
|
||||
return filtered
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user