mirror of
https://github.com/golang/go
synced 2024-11-20 03:04:40 -07:00
crypto/tls: add Error method to alert
alerts get used as both values and errors. Rather than introduce an alertError wrapper, this CL just adds an Error method, which will satisfy the error interface when the time comes. R=agl, bradfitz CC=golang-dev https://golang.org/cl/5294073
This commit is contained in:
parent
64f78c918a
commit
01e9a227cc
@ -71,3 +71,7 @@ func (e alert) String() string {
|
||||
}
|
||||
return "alert(" + strconv.Itoa(int(e)) + ")"
|
||||
}
|
||||
|
||||
func (e alert) Error() string {
|
||||
return e.String()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user