mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-02-03 22:18:39 +00:00
Do not rely on unspecified assignment order of return statement
See: https://github.com/golang/go/issues/58233
This commit is contained in:
committed by
Cuong Manh Le
parent
68fe7e8406
commit
2326160f2f
5
doh.go
5
doh.go
@@ -85,7 +85,10 @@ func (r *dohResolver) Resolve(ctx context.Context, msg *dns.Msg) (*dns.Msg, erro
|
||||
}
|
||||
|
||||
answer := new(dns.Msg)
|
||||
return answer, answer.Unpack(buf)
|
||||
if err := answer.Unpack(buf); err != nil {
|
||||
return nil, fmt.Errorf("answer.Unpack: %w", err)
|
||||
}
|
||||
return answer, nil
|
||||
}
|
||||
|
||||
func addHeader(ctx context.Context, req *http.Request, sendClientInfo bool) {
|
||||
|
||||
Reference in New Issue
Block a user