diff options
author | Russ Cox <rsc@golang.org> | 2011-10-27 19:42:32 -0700 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2011-10-27 19:42:32 -0700 |
commit | 4c8bfed782a38c80e8d6fa4f77c9db17b6594431 (patch) | |
tree | 93301361f7c65965f717cbb2ed339469c4153a19 /src/pkg/crypto | |
parent | 7bdef0e56fe239488df13b702e5b3a55175ed67d (diff) | |
download | go-4c8bfed782a38c80e8d6fa4f77c9db17b6594431.tar.gz |
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
http://codereview.appspot.com/5294073
Diffstat (limited to 'src/pkg/crypto')
-rw-r--r-- | src/pkg/crypto/tls/alert.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/pkg/crypto/tls/alert.go b/src/pkg/crypto/tls/alert.go index 3b9e0e241..0856311e4 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() +} |