lint: enable wastedassign linter (#7340)

This commit is contained in:
Ville Vesilehto
2025-06-02 02:30:41 +03:00
committed by GitHub
parent bb33ab5301
commit 8cac83dfb5
7 changed files with 9 additions and 10 deletions

View File

@@ -11,10 +11,8 @@ import (
// 54.119.58.176.in-addr.arpa. becomes 176.58.119.54. If the conversion
// fails the empty string is returned.
func ExtractAddressFromReverse(reverseName string) string {
search := ""
f := reverse
var search string
switch {
case strings.HasSuffix(reverseName, IP4arpa):
search = strings.TrimSuffix(reverseName, IP4arpa)

View File

@@ -107,7 +107,7 @@ func (t *Transport) Dial(proto string) (*persistConn, bool, error) {
func (p *Proxy) Connect(ctx context.Context, state request.Request, opts Options) (*dns.Msg, error) {
start := time.Now()
proto := ""
var proto string
switch {
case opts.ForceTCP: // TCP flag has precedence over UDP flag
proto = "tcp"