You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
package service |
|
|
|
import ( |
|
"flag" |
|
"path/filepath" |
|
|
|
"go-common/app/job/main/search/conf" |
|
) |
|
|
|
func WithService(f func(s *Service)) func() { |
|
return func() { |
|
dir, _ := filepath.Abs("../goconvey.toml") |
|
flag.Set("conf", dir) |
|
conf.Init() |
|
s := New(conf.Conf) |
|
// s.dao = dao.New(conf.Conf) |
|
f(s) |
|
} |
|
}
|
|
|