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 ...@@ -31,8 +31,8 @@ func Eval(ctx context.Context, input string, env map[string]interface{}) (interf
} }
for k, v := range env { for k, v := range env {
if mapper, ok := v.(ExprMapper); ok { if mapper, ok := v.(Mapper); ok {
e[k] = mapper.ToExprMap() e[k] = mapper.ToMap()
continue continue
} }
...@@ -85,6 +85,6 @@ func IsExpression(input string) bool { ...@@ -85,6 +85,6 @@ func IsExpression(input string) bool {
return false return false
} }
type ExprMapper interface { type Mapper interface {
ToExprMap() map[string]interface{} ToMap() map[string]interface{}
} }
\ No newline at end of file
...@@ -47,7 +47,7 @@ func (f *File) SetURLWithTemplate(t *template.Template) error { ...@@ -47,7 +47,7 @@ func (f *File) SetURLWithTemplate(t *template.Template) error {
return nil return nil
} }
func (f File) ToExprMap() map[string]interface{} { func (f File) ToMap() map[string]interface{} {
return map[string]interface{}{ return map[string]interface{}{
"id": f.ID, "id": f.ID,
"name": f.Name, "name": f.Name,
......
...@@ -25,7 +25,7 @@ func (r *Reference) MarshalBSON() ([]byte, error) { ...@@ -25,7 +25,7 @@ func (r *Reference) MarshalBSON() ([]byte, error) {
return bson.Marshal(d) return bson.Marshal(d)
} }
func (r *Reference) ToExprMap() map[string]interface{} { func (r *Reference) ToMap() map[string]interface{} {
return map[string]interface{}{ return map[string]interface{}{
"collection_id": r.CollectionID, "collection_id": r.CollectionID,
"id": r.ID, "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