From 01e9a227cc8f8e0d0ffea239f6c601259a6db908 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 --- src/pkg/crypto/tls/alert.go | 4 ++++ 1 file changed, 4 insertions(+) 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() +} -- 2.50.0