fixed bug.
This commit is contained in:
1 parent
77b5f34eed
commit
91df65f2f3
1 file changed
+1
-1
+1
-1
@@ -14,7 +14,7 @@ type errorWrapper struct {
|
|||||||
type ApiHandler func(w http.ResponseWriter, request *http.Request) (interface{}, error)
|
type ApiHandler func(w http.ResponseWriter, request *http.Request) (interface{}, error)
|
||||||
|
|
||||||
func (this ApiHandler) addEnlapsedTimeIfPossible(enlapsedTime time.Duration, obj interface{}) {
|
func (this ApiHandler) addEnlapsedTimeIfPossible(enlapsedTime time.Duration, obj interface{}) {
|
||||||
if dict, ok := obj.(map[string]interface{}); ok {
|
if dict, ok := obj.(map[string]interface{}); ok && dict != nil {
|
||||||
dict["enlapsed_time"] = enlapsedTime.Seconds()
|
dict["enlapsed_time"] = enlapsedTime.Seconds()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user