Skip to content
Snippets Groups Projects
Commit d0f74a1a authored by Danis Kirasirov's avatar Danis Kirasirov
Browse files

rename interface

parent bf13f986
No related branches found
No related tags found
No related merge requests found
......@@ -31,8 +31,8 @@ func Eval(ctx context.Context, input string, env map[string]interface{}) (interf
}
for k, v := range env {
if mapper, ok := v.(ExprMapper); ok {
e[k] = mapper.ToExprMap()
if mapper, ok := v.(Mapper); ok {
e[k] = mapper.ToMap()
continue
}
......@@ -85,6 +85,6 @@ func IsExpression(input string) bool {
return false
}
type ExprMapper interface {
ToExprMap() map[string]interface{}
type Mapper interface {
ToMap() map[string]interface{}
}
\ No newline at end of file
......@@ -47,7 +47,7 @@ func (f *File) SetURLWithTemplate(t *template.Template) error {
return nil
}
func (f File) ToExprMap() map[string]interface{} {
func (f File) ToMap() map[string]interface{} {
return map[string]interface{}{
"id": f.ID,
"name": f.Name,
......
......@@ -25,7 +25,7 @@ func (r *Reference) MarshalBSON() ([]byte, error) {
return bson.Marshal(d)
}
func (r *Reference) ToExprMap() map[string]interface{} {
func (r *Reference) ToMap() map[string]interface{} {
return map[string]interface{}{
"collection_id": r.CollectionID,
"id": r.ID,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment