mirror of
				https://github.com/coredns/coredns.git
				synced 2025-10-30 17:53:21 -04:00 
			
		
		
		
	Cleanup in go vet and misspell (#996)
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
This commit is contained in:
		| @@ -118,7 +118,7 @@ func (f *Federation) Name() string { return "federation" } | |||||||
| // label is always the 2nd to last once the zone is chopped of. For instance | // label is always the 2nd to last once the zone is chopped of. For instance | ||||||
| // "nginx.mynamespace.myfederation.svc.example.com" has "myfederation" as the federation label. | // "nginx.mynamespace.myfederation.svc.example.com" has "myfederation" as the federation label. | ||||||
| // IsNameFederation returns a new qname with the federation label and the label itself or two | // IsNameFederation returns a new qname with the federation label and the label itself or two | ||||||
| // emtpy strings if there wasn't a hit. | // empty strings if there wasn't a hit. | ||||||
| func (f *Federation) isNameFederation(name, zone string) (string, string) { | func (f *Federation) isNameFederation(name, zone string) (string, string) { | ||||||
| 	base, _ := dnsutil.TrimZone(name, zone) | 	base, _ := dnsutil.TrimZone(name, zone) | ||||||
|  |  | ||||||
|   | |||||||
| @@ -74,7 +74,7 @@ func parseRequest(state request.Request) (r recordRequest, err error) { | |||||||
| 		return r, nil | 		return r, nil | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	// Becuase of ambiquity we check the labels left: 1: an endpoint. 2: port and protocol. | 	// Because of ambiquity we check the labels left: 1: an endpoint. 2: port and protocol. | ||||||
| 	// Anything else is a query that is too long to answer and can safely be delegated to return an nxdomain. | 	// Anything else is a query that is too long to answer and can safely be delegated to return an nxdomain. | ||||||
| 	switch last { | 	switch last { | ||||||
|  |  | ||||||
|   | |||||||
| @@ -234,11 +234,11 @@ func (rule *edns0VariableRule) ruleData(w dns.ResponseWriter, r *dns.Msg) ([]byt | |||||||
| 		return []byte(req.Proto()), nil | 		return []byte(req.Proto()), nil | ||||||
|  |  | ||||||
| 	case serverIP: | 	case serverIP: | ||||||
| 		serverIp, _, err := net.SplitHostPort(w.LocalAddr().String()) | 		ip, _, err := net.SplitHostPort(w.LocalAddr().String()) | ||||||
| 		if err != nil { | 		if err != nil { | ||||||
| 			serverIp = w.RemoteAddr().String() | 			ip = w.RemoteAddr().String() | ||||||
| 		} | 		} | ||||||
| 		return rule.ipToWire(rule.family(w.RemoteAddr()), serverIp) | 		return rule.ipToWire(rule.family(w.RemoteAddr()), ip) | ||||||
|  |  | ||||||
| 	case serverPort: | 	case serverPort: | ||||||
| 		_, port, err := net.SplitHostPort(w.LocalAddr().String()) | 		_, port, err := net.SplitHostPort(w.LocalAddr().String()) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user