mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-25 00:05:15 +00:00
cmd: move package import paths
This commit is contained in:
parent
96b10caa8c
commit
f9fe5d7790
|
@ -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
6
pkg/cmd/import.go
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
package cmd
|
||||||
|
|
||||||
|
// import built-in strategies
|
||||||
|
import (
|
||||||
|
_ "github.com/c9s/bbgo/pkg/cmd/strategy"
|
||||||
|
)
|
|
@ -1,4 +1,4 @@
|
||||||
package cmd
|
package strategy
|
||||||
|
|
||||||
// import built-in strategies
|
// import built-in strategies
|
||||||
import (
|
import (
|
Loading…
Reference in New Issue
Block a user