Browse Source

Merge pull request #153 from Loyalsoldier/minor-fixes

Minor fixes
Kslr 5 years ago
parent
commit
971c5f2ee8
2 changed files with 2 additions and 3 deletions
  1. 1 2
      app/dns/server.go
  2. 1 1
      common/strmatcher/strmatcher.go

+ 1 - 2
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 {

+ 1 - 1
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
 }