forked from golang/hotime
This commit is contained in:
parent
e99c726e26
commit
ba1cf9fff1
3
.idea/copyright/profiles_settings.xml
Normal file
3
.idea/copyright/profiles_settings.xml
Normal file
@ -0,0 +1,3 @@
|
||||
<component name="CopyrightManager">
|
||||
<settings default="" />
|
||||
</component>
|
10
.idea/goLibraries.xml
Normal file
10
.idea/goLibraries.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="GoLibraries">
|
||||
<option name="urls">
|
||||
<list>
|
||||
<option value="file://$PROJECT_DIR$/../../.." />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
8
.idea/libraries/Go_SDK.xml
Normal file
8
.idea/libraries/Go_SDK.xml
Normal file
@ -0,0 +1,8 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Go SDK">
|
||||
<CLASSES>
|
||||
<root url="file://D:/app/go/src" />
|
||||
</CLASSES>
|
||||
<SOURCES />
|
||||
</library>
|
||||
</component>
|
@ -21,6 +21,13 @@ func ObjToMap(obj interface{}, e ...*Error) Map {
|
||||
v = obj.(Map)
|
||||
case map[string]interface{}:
|
||||
v = obj.(map[string]interface{})
|
||||
case string:
|
||||
v = Map{}
|
||||
e := json.Unmarshal([]byte(obj.(string)), &v)
|
||||
if e != nil {
|
||||
err = errors.New("没有合适的转换对象!" + e.Error())
|
||||
v = nil
|
||||
}
|
||||
default:
|
||||
data, err := json.Marshal(obj)
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user