Prechádzať zdrojové kódy

update alias map[string]string

ls 3 rokov pred
rodič
commit
cdf61becab
1 zmenil súbory, kde vykonal 7 pridanie a 7 odobranie
  1. 7 7
      utils.go

+ 7 - 7
utils.go

@@ -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",