md5_test.go 299 B

123456789101112131415161718192021
  1. package md5
  2. import (
  3. "encoding/json"
  4. "fmt"
  5. "testing"
  6. )
  7. func TestMd5(t *testing.T) {
  8. fmt.Println(Md5([]byte("test")))
  9. }
  10. func TestMd5File(t *testing.T) {
  11. x := `{"x":348454,"a":"7asdfuasdf3241234","list":[1,2,3,4,5]}`
  12. var y map[string]interface{}
  13. json.Unmarshal([]byte(x), &y)
  14. t.Log(y)
  15. }