func ExecuteMacro(name string, params []string) (string, error) {
	macro, found := macroMap[name]
	if !found {
		return "", errors.New("macro not found")
	}

	f := reflect.ValueOf(macro)
	if len(params) != f.Type().NumIn() {
		return "", errors.New("the number of params is not adapted")
	}

	in := make([]reflect.Value, len(params))
	for k, param := range params {
		in[k] = reflect.ValueOf(param)
	}
	result := f.Call(in)
	if len(result) < 1 {
		return "", errors.New("unable to get result from macro")
	}
	return result[0].String(), nil
}
// ExecuteMacro calls a macro by `name`, with parameters to be passed using `params`. `params` is a collection of strings
// that get passed as is. Type assertions will need be performed in the macro implementation.
ExecuteMacro calls a macro by `name`, with parameters to be passed using `params`. `params` is a collection of strings
that get passed as is. Type assertions will need be performed in the macro implementation.
// ExecuteMacro calls a macro by ` name ` with parameters to be passed using ` params ` . ` params ` is a collection of strings // that get passed as is . Type assertions will need be performed in the macro implementation .
func ExecuteMacro(name string, params []string) (string, error) {
	macro, found := macroMap[name]
	if !found {
		return "", errors.New("macro not found")
	}
	f := reflect.ValueOf(macro)
	if len(params) != f.Type().NumIn() {
		return "", errors.New("the number of params is not adapted")
	}
	in := make([]reflect.Value, len(params))
	for k, param := range params {
		in[k] = reflect.ValueOf(param)
	}
	result := f.Call(in)
	if len(result) < 1 {
		return "", errors.New("unable to get result from macro")
	}
	return result[0].String(), nil
}
func ExecuteMacro ( name string , params [ ] string ) ( string , error ) { macro , found := macroMap [ name ] if ! found { return " " , errors . New ( " " ) } f := reflect . ValueOf ( macro ) if len ( params ) != f . Type ( ) . NumIn ( ) { return " " , errors . New ( " " ) } in := make ( [ ] reflect . Value , len ( params ) ) for k , param := range params { in [ k ] = reflect . ValueOf ( param ) } result := f . Call ( in ) if len ( result ) < 1 { return " " , errors . New ( " " ) } return result [ 0 ] . String ( ) , nil }
ExecuteMacro calls a macro by `name`, with parameters to be passed using `params`.
ExecuteMacro calls a macro by ` name ` with parameters to be passed using ` params ` .