Browse Source

support attributes in session.Content

Darien Raymond 6 years ago
parent
commit
9efa8941ec
1 changed files with 6 additions and 6 deletions
  1. 6 6
      common/session/session.go

+ 6 - 6
common/session/session.go

@@ -67,19 +67,19 @@ type Content struct {
 
 
 	SniffingRequest SniffingRequest
 	SniffingRequest SniffingRequest
 
 
-	attr map[string]interface{}
+	Attributes map[string]interface{}
 }
 }
 
 
 func (c *Content) SetAttribute(name string, value 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{} {
 func (c *Content) Attribute(name string) interface{} {
-	if c.attr == nil {
+	if c.Attributes == nil {
 		return nil
 		return nil
 	}
 	}
-	return c.attr[name]
+	return c.Attributes[name]
 }
 }