mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-24 07:45:15 +00:00
examples: fix lint issues
This commit is contained in:
parent
88f243c91b
commit
0baac39489
|
@ -36,11 +36,12 @@ type closePositionTask struct {
|
||||||
confirmed bool
|
confirmed bool
|
||||||
}
|
}
|
||||||
|
|
||||||
type PositionInteraction struct {
|
type positionInteraction struct {
|
||||||
closePositionTask closePositionTask
|
closePositionTask closePositionTask
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *PositionInteraction) Commands(i *interact.Interact) {
|
// Commands implements the custom interaction
|
||||||
|
func (m *positionInteraction) Commands(i *interact.Interact) {
|
||||||
i.Command("/closePosition", "", func(reply interact.Reply) error {
|
i.Command("/closePosition", "", func(reply interact.Reply) error {
|
||||||
// send symbol options
|
// send symbol options
|
||||||
reply.Message("Choose your position")
|
reply.Message("Choose your position")
|
||||||
|
@ -142,7 +143,7 @@ func main() {
|
||||||
Token: "123",
|
Token: "123",
|
||||||
})
|
})
|
||||||
|
|
||||||
interact.AddCustomInteraction(&PositionInteraction{})
|
interact.AddCustomInteraction(&positionInteraction{})
|
||||||
if err := interact.Start(ctx); err != nil {
|
if err := interact.Start(ctx); err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,7 +38,7 @@ var rootCmd = &cobra.Command{
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
var client *kucoinapi.RestClient = nil
|
var client *kucoinapi.RestClient
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
if _, err := os.Stat(".env.local"); err == nil {
|
if _, err := os.Stat(".env.local"); err == nil {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user