From 82b478157138239178d5bf398a2fdc5469e813c7 Mon Sep 17 00:00:00 2001 From: Wenkai Yin Date: Mon, 13 Jun 2016 13:48:12 +0800 Subject: [PATCH] update implements of FilterTargets() --- dao/replication_job.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/dao/replication_job.go b/dao/replication_job.go index 3e2d83a6a..c6b3707f8 100644 --- a/dao/replication_job.go +++ b/dao/replication_job.go @@ -68,13 +68,10 @@ func FilterRepTargets(name string) ([]*models.RepTarget, error) { } o := GetOrmer() - var args []string - args = append(args, "%"+name+"%") - var targets []*models.RepTarget sql := "select * from replication_target where name like ?" - if _, err := o.Raw(sql, args).QueryRows(targets); err != nil { + if _, err := o.Raw(sql, "%"+name+"%").QueryRows(&targets); err != nil { return nil, err }