From 323ef03f02d3fe080c0ffbd5e9c7cf7a6d4b3852 Mon Sep 17 00:00:00 2001 From: loyalsoldier <10487845+Loyalsoldier@users.noreply.github.com> Date: Mon, 31 Aug 2020 17:53:16 +0800 Subject: [PATCH] Minor fixes --- app/dns/server.go | 3 +-- common/strmatcher/strmatcher.go | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/app/dns/server.go b/app/dns/server.go index 4d1eb16ca..2810d28fd 100644 --- a/app/dns/server.go +++ b/app/dns/server.go @@ -114,8 +114,7 @@ func New(ctx context.Context, config *Config) (*Server, error) { log.Fatalln(newError("DNS config error").Base(err)) } server.clients = append(server.clients, NewDoHLocalNameServer(u, server.clientIP)) - } else if address.Family().IsDomain() && - strings.HasPrefix(address.Domain(), "https://") { + } else if address.Family().IsDomain() && strings.HasPrefix(address.Domain(), "https://") { // DOH Remote mode u, err := url.Parse(address.Domain()) if err != nil { diff --git a/common/strmatcher/strmatcher.go b/common/strmatcher/strmatcher.go index cc889b73e..9728047d5 100644 --- a/common/strmatcher/strmatcher.go +++ b/common/strmatcher/strmatcher.go @@ -49,7 +49,7 @@ func (t Type) New(pattern string) (Matcher, error) { // IndexMatcher is the interface for matching with a group of matchers. type IndexMatcher interface { - // Match returns the the index of a matcher that matches the input. It returns empty array if no such matcher exists. + // Match returns the index of a matcher that matches the input. It returns empty array if no such matcher exists. Match(input string) []uint32 }