This commit is contained in:
Generated
+3
@@ -0,0 +1,3 @@
|
||||
<component name="CopyrightManager">
|
||||
<settings default="" />
|
||||
</component>
|
||||
Generated
+10
@@ -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>
|
||||
Generated
+8
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user