Use golint to normalize the code (#1)

This commit is contained in:
Li4n0
2021-04-21 22:08:29 +08:00
committed by GitHub
parent d4a47aebca
commit 960b2ab5ea
39 changed files with 1046 additions and 1108 deletions
+2 -2
View File
@@ -11,13 +11,13 @@ func Accept(logger Logger) dns.MsgAcceptFunc {
return func(dh dns.Header) dns.MsgAcceptAction {
// check if request
if dh.Bits&(1<<15) != 0 {
log(logger, Ignored, nil, nil, fmt.Sprintf("not a request"))
log(logger, Ignored, nil, nil, "not a request")
return dns.MsgIgnore
}
// check opcode
if int(dh.Bits>>11)&0xF != dns.OpcodeQuery {
log(logger, Ignored, nil, nil, fmt.Sprintf("not a query"))
log(logger, Ignored, nil, nil, "not a query")
return dns.MsgIgnore
}