|
@@ -19,28 +19,28 @@ const (
|
|
|
PB
|
|
|
)
|
|
|
|
|
|
-// Map is a shortcut for map[string]interface{}
|
|
|
-type Map map[string]interface{}
|
|
|
+// M is a shortcut for map[string]interface{}
|
|
|
+type M map[string]interface{}
|
|
|
|
|
|
-// NewMap new map
|
|
|
-func NewMap() Map {
|
|
|
+// NewM new map
|
|
|
+func NewM() M {
|
|
|
return make(map[string]interface{})
|
|
|
}
|
|
|
|
|
|
// String map to json string
|
|
|
-func (m Map) String() string {
|
|
|
+func (m M) String() string {
|
|
|
bs, _ := json.Marshal(m)
|
|
|
return string(bs)
|
|
|
}
|
|
|
|
|
|
// Bytes map to json bytes
|
|
|
-func (m Map) Bytes() []byte {
|
|
|
+func (m M) Bytes() []byte {
|
|
|
bs, _ := json.Marshal(m)
|
|
|
return bs
|
|
|
}
|
|
|
|
|
|
// MarshalXML allows type Map to be used with xml.Marshal.
|
|
|
-func (m Map) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
|
|
|
+func (m M) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
|
|
|
start.Name = xml.Name{
|
|
|
Space: "",
|
|
|
Local: "map",
|