diff --git a/api/api.go b/api/api.go index b51a813c5..99297e995 100644 --- a/api/api.go +++ b/api/api.go @@ -2,13 +2,11 @@ package api import ( "fmt" - "path/filepath" "strings" "github.com/yaoapp/gou/api" "github.com/yaoapp/gou/application" "github.com/yaoapp/yao/config" - "github.com/yaoapp/yao/data" "github.com/yaoapp/yao/share" ) @@ -28,23 +26,6 @@ func Load(cfg config.Config) error { return err }, exts...) - // Load APIs from bindata (**will be removed in the future**) - names := []string{"import", "storage"} - for _, name := range names { - file := filepath.Join("yao", "apis", fmt.Sprintf("%s.http.json", name)) - id := fmt.Sprintf("xiang.%s", name) - - source, err := data.Read(file) - if err != nil { - messages = append(messages, err.Error()) - } - - _, err = api.LoadSource(file, source, id) - if err != nil { - messages = append(messages, err.Error()) - } - } - if len(messages) > 0 { return fmt.Errorf(strings.Join(messages, ";\n")) } diff --git a/api/api_test.go b/api/api_test.go index 1e40fa12f..59b449841 100644 --- a/api/api_test.go +++ b/api/api_test.go @@ -25,8 +25,8 @@ func check(t *testing.T) { assert.True(t, ids["user"]) assert.True(t, ids["user.pet"]) - assert.True(t, ids["xiang.import"]) // will be removed in the future - assert.True(t, ids["xiang.storage"]) // will be removed in the future + // assert.True(t, ids["xiang.import"]) // will be removed in the future + // assert.True(t, ids["xiang.storage"]) // will be removed in the future // wskeys := []string{} // for key := range websocket.Upgraders { diff --git a/engine/load.go b/engine/load.go index 3d34f8178..3f785289e 100644 --- a/engine/load.go +++ b/engine/load.go @@ -385,12 +385,6 @@ func Reload(cfg config.Config, options LoadOption) (err error) { printErr(cfg.Mode, "Widgets", err) } - // Load Importers - err = importer.Load(cfg) - if err != nil { - printErr(cfg.Mode, "Plugin", err) - } - // Load Apis err = api.Load(cfg) // 加载业务接口 API if err != nil {