From 440bc4277720787c977de26eef0255266e5440f5 Mon Sep 17 00:00:00 2001 From: edwardro22 Date: Tue, 28 Nov 2017 10:35:05 +0000 Subject: [PATCH] Parsing time.Time in console help command --- console/command_executer.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/console/command_executer.go b/console/command_executer.go index 1aebcf316..bf5a3d2e1 100644 --- a/console/command_executer.go +++ b/console/command_executer.go @@ -25,6 +25,7 @@ import ( "reflect" "regexp" "strings" + "time" "github.com/cgrates/cgrates/utils" ) @@ -81,6 +82,10 @@ func (ce *CommandExecuter) clientArgs(iface interface{}) (args []string) { continue } } + if _, canCast := valField.Interface().(time.Time); canCast { + args = append(args, typeField.Name) + continue + } args = append(args, ce.clientArgs(valField.Interface())...) default: