From 9efa8941ec57d83b906907f413197045f7a815f4 Mon Sep 17 00:00:00 2001 From: Darien Raymond Date: Thu, 28 Feb 2019 14:39:50 +0100 Subject: [PATCH] support attributes in session.Content --- common/session/session.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/common/session/session.go b/common/session/session.go index 3d306af6..8ce25b55 100644 --- a/common/session/session.go +++ b/common/session/session.go @@ -67,19 +67,19 @@ type Content struct { SniffingRequest SniffingRequest - attr map[string]interface{} + Attributes map[string]interface{} } func (c *Content) SetAttribute(name string, value interface{}) { - if c.attr == nil { - c.attr = make(map[string]interface{}) + if c.Attributes == nil { + c.Attributes = make(map[string]interface{}) } - c.attr[name] = value + c.Attributes[name] = value } func (c *Content) Attribute(name string) interface{} { - if c.attr == nil { + if c.Attributes == nil { return nil } - return c.attr[name] + return c.Attributes[name] }