github.com/zooyer/miskit@v1.0.71/errors/errors_test.go (about)

     1  package errors
     2  
     3  import (
     4  	"encoding/json"
     5  	"testing"
     6  )
     7  
     8  func TestTTT(t *testing.T) {
     9  	var a = map[string]interface{}{
    10  		"name": "zs",
    11  		"age":  24,
    12  	}
    13  
    14  	var b = make(map[interface{}]interface{})
    15  
    16  	data, _ := json.Marshal(a)
    17  
    18  	if err := json.Unmarshal(data, &b); err != nil {
    19  		t.Fatal(err)
    20  	}
    21  
    22  	t.Logf("%#v", b)
    23  }