github.com/searKing/golang/go@v1.2.117/net/resolver/dns/go113.go (about)

     1  // Copyright 2021 The searKing Author. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  //go:build go1.13
     6  // +build go1.13
     7  
     8  package dns
     9  
    10  import "net"
    11  
    12  func init() {
    13  	filterError = func(err error) error {
    14  		if dnsErr, ok := err.(*net.DNSError); ok && dnsErr.IsNotFound {
    15  			// The name does not exist; not an error.
    16  			return nil
    17  		}
    18  		return err
    19  	}
    20  }