From 7e2e1f0c1951c41c443cc05fbb1e12737063d04d Mon Sep 17 00:00:00 2001 From: Evan Chen Date: Sun, 19 Dec 2021 02:11:23 +0800 Subject: [PATCH] update --- attribute/service.go | 15 --------------- helper.go | 5 ++++- 2 files changed, 4 insertions(+), 16 deletions(-) delete mode 100644 attribute/service.go diff --git a/attribute/service.go b/attribute/service.go deleted file mode 100644 index 2bc1809..0000000 --- a/attribute/service.go +++ /dev/null @@ -1,15 +0,0 @@ -package attribute - -type Service struct{} - -func (srv Service) GetName() string { return "attribute.Service" } -func (srv Service) IsService() bool { return true } -func (srv Service) GetDependencies() []string { return []string{} } -func (srv Service) Main() error { return nil } -func (srv Service) Del() {} -func (srv Service) Load() error { return nil } -func (srv Service) Health() error { return nil } - -func (srv Service) Init() error { - return Init() -} diff --git a/helper.go b/helper.go index 31e48e0..0ab5e95 100644 --- a/helper.go +++ b/helper.go @@ -18,6 +18,10 @@ func Default() *system.System { sys := system.New() server := server.New(viper.GetString("name")) + if err := attribute.Init(); err != nil { + panic(err) + } + auth.Setup() auth.SetDB(store.DB) @@ -27,7 +31,6 @@ func Default() *system.System { &history.Service{}, &email.Service{}, &control.Service{}, - &attribute.Service{}, ) return sys }