mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
bbgo: rename NewStandard to just New
This commit is contained in:
parent
5e8f8b492a
commit
420654c5ed
|
@ -714,7 +714,7 @@ func (session *ExchangeSession) InitExchange(name string, ex types.Exchange) err
|
|||
ex, err = exchange2.NewPublic(exchangeName)
|
||||
} else {
|
||||
if session.Key != "" && session.Secret != "" {
|
||||
ex, err = exchange2.NewStandard(exchangeName, session.Key, session.Secret, session.Passphrase)
|
||||
ex, err = exchange2.New(exchangeName, session.Key, session.Secret, session.Passphrase)
|
||||
} else {
|
||||
ex, err = exchange2.NewWithEnvVarPrefix(exchangeName, session.EnvVarPrefix)
|
||||
}
|
||||
|
|
|
@ -13,10 +13,10 @@ import (
|
|||
)
|
||||
|
||||
func NewPublic(exchangeName types.ExchangeName) (types.Exchange, error) {
|
||||
return NewStandard(exchangeName, "", "", "")
|
||||
return New(exchangeName, "", "", "")
|
||||
}
|
||||
|
||||
func NewStandard(n types.ExchangeName, key, secret, passphrase string) (types.Exchange, error) {
|
||||
func New(n types.ExchangeName, key, secret, passphrase string) (types.Exchange, error) {
|
||||
switch n {
|
||||
|
||||
case types.ExchangeBinance:
|
||||
|
@ -54,5 +54,5 @@ func NewWithEnvVarPrefix(n types.ExchangeName, varPrefix string) (types.Exchange
|
|||
|
||||
passphrase := os.Getenv(varPrefix + "_API_PASSPHRASE")
|
||||
subAccount := os.Getenv(varPrefix + "_SUBACCOUNT")
|
||||
return NewStandard(n, key, secret, passphrase)
|
||||
return New(n, key, secret, passphrase)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user