cmd: move package import paths

This commit is contained in:
c9s 2022-08-02 01:07:48 +08:00
parent 96b10caa8c
commit f9fe5d7790
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54
3 changed files with 9 additions and 3 deletions

View File

@ -16,11 +16,11 @@ In general, strategies are Go struct, defined in the Go package.
To add your first strategy, the fastest way is to add it as a built-in strategy. To add your first strategy, the fastest way is to add it as a built-in strategy.
Simply edit `pkg/cmd/builtin.go` and import your strategy package there. Simply edit `pkg/cmd/strategy/builtin.go` and import your strategy package there.
When BBGO starts, the strategy will be imported as a package, and register its struct to the engine. When BBGO starts, the strategy will be imported as a package, and register its struct to the engine.
You can also create a new file called `pkg/cmd/builtin_short.go` and import your strategy package. You can also create a new file called `pkg/cmd/strategy/short.go` and import your strategy package.
``` ```
import ( import (

6
pkg/cmd/import.go Normal file
View File

@ -0,0 +1,6 @@
package cmd
// import built-in strategies
import (
_ "github.com/c9s/bbgo/pkg/cmd/strategy"
)

View File

@ -1,4 +1,4 @@
package cmd package strategy
// import built-in strategies // import built-in strategies
import ( import (