From bc69be28e73ce7b7aad6d9a5e02b109c3cebc68b Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Thu, 27 Oct 2011 19:42:32 -0700 Subject: [PATCH] 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 --- alert.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/alert.go b/alert.go index 3b9e0e2..0856311 100644 --- a/alert.go +++ b/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() +}