m13253 / dns-over-https

High performance DNS over HTTPS client & server
https://developers.google.com/speed/public-dns/docs/dns-over-https
MIT License
1.96k stars 221 forks source link

chore: unnecessary use of fmt.Sprintf #159

Closed testwill closed 3 months ago

GreyXor commented 3 months ago

Thanks @testwill :)

m13253 commented 3 months ago

Thanks for the contribution!

I appreciate it!

vinnyperella commented 2 months ago

That string exists elsewhere in that file is that the only place it needs removed? For example:

return &DNSRequest{ errcode: 400, errtext: fmt.Sprintf("Invalid argument value: \"dns\" = %q", requestBase64),

m13253 commented 2 months ago

I think the occurrence with %q you pointed out is how Sprintf is supposed to be used.

That’s good as is in my opinion.