mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-08-10 13:20:33 +02:00
Do not rely on unspecified assignment order of return statement
See: https://github.com/golang/go/issues/58233
This commit is contained in:
@@ -85,7 +85,10 @@ func (r *dohResolver) Resolve(ctx context.Context, msg *dns.Msg) (*dns.Msg, erro
|
|||||||
}
|
}
|
||||||
|
|
||||||
answer := new(dns.Msg)
|
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) {
|
func addHeader(ctx context.Context, req *http.Request, sendClientInfo bool) {
|
||||||
|
|||||||
Reference in New Issue
Block a user