summaryrefslogtreecommitdiff
path: root/securecookie.go
diff options
context:
space:
mode:
Diffstat (limited to 'securecookie.go')
-rw-r--r--securecookie.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/securecookie.go b/securecookie.go
index 620c508..a76083b 100644
--- a/securecookie.go
+++ b/securecookie.go
@@ -375,11 +375,11 @@ func EncodeMulti(name string, value interface{}, codecs ...Codec) (string, error
var errors MultiError
for _, codec := range codecs {
- if encoded, err := codec.Encode(name, value); err == nil {
+ encoded, err := codec.Encode(name, value)
+ if err == nil {
return encoded, nil
- } else {
- errors = append(errors, err)
}
+ errors = append(errors, err)
}
return "", errors
}
@@ -395,11 +395,11 @@ func DecodeMulti(name string, value string, dst interface{}, codecs ...Codec) er
var errors MultiError
for _, codec := range codecs {
- if err := codec.Decode(name, value, dst); err == nil {
+ err := codec.Decode(name, value, dst)
+ if err == nil {
return nil
- } else {
- errors = append(errors, err)
}
+ errors = append(errors, err)
}
return errors
}