// ParseMapStruct is like Parse but takes mapstructure as input
ParseMapStruct is like Parse but takes mapstructure as input
// ParseMapStruct is like Parse but takes mapstructure as input
func ParseMapStruct(input map[string]interface{}) (*MapStruct, error) {
	result := make(map[string]interface{})
	for key, value := range input {
		switch v := value.(type) {
		case string:
			tpl, err := Parse(v)
			if err != nil {
				return nil, err
			}
			result[key] = tpl
		case map[string]interface{}:
			tpl, err := ParseMapStruct(v)
			if err != nil {
				return nil, err
			}
			result[key] = tpl
		default:
			result[key] = v
		}
	}
	return &MapStruct{tpl: result}, nil
}
func ParseMapStruct ( input map [ string ] interface { } ) ( * MapStruct , error ) { result := make ( map [ string ] interface { } ) for key , value := range input { switch v := value . ( type ) { case string : tpl , err := Parse ( v ) if err != nil { return nil , err } result [ key ] = tpl case map [ string ] interface { } : tpl , err := ParseMapStruct ( v ) if err != nil { return nil , err } result [ key ] = tpl default : result [ key ] = v } } return & MapStruct { tpl : result } , nil }
ParseMapStruct is like Parse but takes mapstructure as input
ParseMapStruct is like Parse but takes mapstructure as input