From 8cd214031158fefb8faa539250849441807744fd Mon Sep 17 00:00:00 2001 From: Keunwoo Lee Date: Mon, 27 Jul 2015 10:27:54 -0700 Subject: Move error type assertions to test file. Per elithrar comment on PR 28: https://github.com/gorilla/securecookie/pull/28#discussion_r35059831 --- securecookie.go | 6 ------ securecookie_test.go | 4 ++++ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/securecookie.go b/securecookie.go index 970f7f7..7c05972 100644 --- a/securecookie.go +++ b/securecookie.go @@ -88,9 +88,6 @@ func (e cookieError) Error() string { return strings.Join(parts, "") } -// Asserts that errorImpl is an Error implementation. -var _ Error = errorImpl{} - var ( errGeneratingIV = cookieError{typ: internalError, msg: "failed to generate random iv"} @@ -591,6 +588,3 @@ func (m MultiError) any(pred func(Error) bool) bool { } return false } - -// Asserts that MultiError is an Error implementation. -var _ Error = MultiError{} diff --git a/securecookie_test.go b/securecookie_test.go index 5778000..1d7f640 100644 --- a/securecookie_test.go +++ b/securecookie_test.go @@ -15,6 +15,10 @@ import ( "testing" ) +// Asserts that cookieError and MultiError are Error implementations. +var _ Error = cookieError{} +var _ Error = MultiError{} + var testCookies = []interface{}{ map[string]string{"foo": "bar"}, map[string]string{"baz": "ding"}, -- cgit v1.2.3