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:
Russ Cox 2011-10-27 19:42:32 -07:00
parent dcbc7ee6c7
commit bc69be28e7

View File

@ -71,3 +71,7 @@ func (e alert) String() string {
}
return "alert(" + strconv.Itoa(int(e)) + ")"
}
func (e alert) Error() string {
return e.String()
}