github.com/balzaczyy/golucene@v0.0.0-20151210033525-d0be9ee89713/core/index/model/mixin.go (about) 1 package model 2 3 type AttributesMixin struct { 4 attributes map[string]string 5 } 6 7 /* Get a codec attribute value, or "" if it does not exist */ 8 func (m *AttributesMixin) Attribute(key string) string { 9 if m.attributes == nil { 10 return "" 11 } 12 return m.attributes[key] 13 } 14 15 /* Returns the internal codec attributes map. */ 16 func (m *AttributesMixin) Attributes() map[string]string { 17 return m.attributes 18 }