From: Russ Cox Date: Fri, 28 Oct 2011 02:42:32 +0000 (-0700) Subject: crypto/tls: add Error method to alert X-Git-Tag: weekly.2011-11-01~33 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=01e9a227cc8f8e0d0ffea239f6c601259a6db908;p=gostls13.git 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 --- diff --git a/src/pkg/crypto/tls/alert.go b/src/pkg/crypto/tls/alert.go index 3b9e0e2415..0856311e4c 100644 --- a/src/pkg/crypto/tls/alert.go +++ b/src/pkg/crypto/tls/alert.go @@ -71,3 +71,7 @@ func (e alert) String() string { } return "alert(" + strconv.Itoa(int(e)) + ")" } + +func (e alert) Error() string { + return e.String() +}