diff --git a/backend/apps/api.go b/backend/apps/api.go index 43a34bc8..ee3bed74 100644 --- a/backend/apps/api.go +++ b/backend/apps/api.go @@ -74,6 +74,6 @@ func NewApi() *Api { api := &Api{ app: gin.New(), } - api.Init() + // api.Init() return api } diff --git a/backend/cmd/root.go b/backend/cmd/root.go index 9d0ef3eb..51f9da38 100644 --- a/backend/cmd/root.go +++ b/backend/cmd/root.go @@ -30,6 +30,7 @@ func Execute() error { func init() { cobra.OnInitialize(initConfig) + rootCmd.PersistentFlags().StringVar(&cfgFile, "c", "", "Use Custom Config File") } func initConfig() { diff --git a/backend/go.mod b/backend/go.mod index 9e98b8e9..4c7116d4 100644 --- a/backend/go.mod +++ b/backend/go.mod @@ -2,12 +2,17 @@ module crawlab go 1.16 -require ( - github.com/apex/log v1.9.0 - github.com/crawlab-team/crawlab-core v0.6.0-beta.20211230.1200 - github.com/crawlab-team/go-trace v0.1.1 - github.com/gin-gonic/gin v1.7.1 - github.com/spf13/cobra v1.1.3 - github.com/spf13/viper v1.7.1 - go.uber.org/dig v1.10.0 +replace ( + github.com/crawlab-team/crawlab-core => /Users/chenjingyang/dev/my-job/gitee/crawlab-core + github.com/crawlab-team/goseaweedfs => /Users/chenjingyang/dev/my-job/gitee/goseaweedfs +) + +require ( + github.com/apex/log v1.9.0 + github.com/crawlab-team/crawlab-core v0.6.0-beta.20211230.1200 + github.com/crawlab-team/go-trace v0.1.1 + github.com/gin-gonic/gin v1.7.1 + github.com/spf13/cobra v1.1.3 + github.com/spf13/viper v1.7.1 + go.uber.org/dig v1.10.0 ) diff --git a/backend/go.mod.local b/backend/go.mod.local deleted file mode 100644 index 41c13932..00000000 --- a/backend/go.mod.local +++ /dev/null @@ -1,20 +0,0 @@ -module crawlab - -go 1.16 - -replace ( - github.com/crawlab-team/crawlab-core => /libs/crawlab-team/crawlab-core - github.com/crawlab-team/crawlab-vcs => /libs/crawlab-team/crawlab-vcs - github.com/crawlab-team/crawlab-fs => /libs/crawlab-team/crawlab-fs - github.com/crawlab-team/crawlab-db => /libs/crawlab-team/crawlab-db -) - -require ( - github.com/apex/log v1.9.0 - github.com/crawlab-team/crawlab-core v0.6.0-beta.20211219.2134 - github.com/crawlab-team/go-trace v0.1.1 - github.com/gin-gonic/gin v1.7.1 - github.com/spf13/cobra v1.1.3 - github.com/spf13/viper v1.7.1 - go.uber.org/dig v1.10.0 -) diff --git a/backend/go.mod.remote b/backend/go.mod.remote new file mode 100644 index 00000000..9e98b8e9 --- /dev/null +++ b/backend/go.mod.remote @@ -0,0 +1,13 @@ +module crawlab + +go 1.16 + +require ( + github.com/apex/log v1.9.0 + github.com/crawlab-team/crawlab-core v0.6.0-beta.20211230.1200 + github.com/crawlab-team/go-trace v0.1.1 + github.com/gin-gonic/gin v1.7.1 + github.com/spf13/cobra v1.1.3 + github.com/spf13/viper v1.7.1 + go.uber.org/dig v1.10.0 +)