fixed bug.

This commit is contained in:
didier.amyot committed 2014-06-02 10:13:47 -04:00
1 parent 77b5f34eed
commit 91df65f2f3
1 file changed
+1 -1
+1 -1
View File
@@ -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()
} }