Rename reason ctx to prevent confusion with context.Ctx

This commit is contained in:
Daniel 2020-04-24 10:57:24 +02:00
parent 3b0d60b611
commit 542577314b

View file

@ -236,11 +236,11 @@ func (conn *Connection) Failed(reason string) {
}
// SetVerdict sets a new verdict for the connection, making sure it does not interfere with previous verdicts.
func (conn *Connection) SetVerdict(newVerdict Verdict, reason string, ctx interface{}) (ok bool) {
func (conn *Connection) SetVerdict(newVerdict Verdict, reason string, reasonCtx interface{}) (ok bool) {
if newVerdict >= conn.Verdict {
conn.Verdict = newVerdict
conn.Reason = reason
conn.ReasonContext = ctx
conn.ReasonContext = reasonCtx
return true
}
return false