mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-22 23:16:48 +00:00
CI: Fix golangci-lint linter issues, add prealloc linter and bump version depends for Go 1.18 (#915)
* Bump CI versions * Specifically set go version as 1.17.x bumps it to 1.18 * Another * Adjust AppVeyor * Part 1 of linter issues * Part 2 * Fix various linters and improvements * Part 3 * Finishing touches * Tests and EqualFold * Fix nitterinos plus bonus requester jobs bump for exchanges with large number of tests * Fix nitterinos and bump golangci-lint timeout for AppVeyor * Address nits, ensure all books are returned on err due to syncer regression * Fix the wiggins * Fix duplication * Fix nitterinos
This commit is contained in:
@@ -2,7 +2,7 @@ package gct
|
||||
|
||||
// AllModuleNames returns a list of all default module names.
|
||||
func AllModuleNames() []string {
|
||||
var names []string
|
||||
names := make([]string, 0, len(Modules))
|
||||
for name := range Modules {
|
||||
names = append(names, name)
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ func ema(args ...objects.Object) (objects.Object, error) {
|
||||
return nil, fmt.Errorf(modules.ErrParameterConvertFailed, OHLCV)
|
||||
}
|
||||
|
||||
var ohlcvClose []float64
|
||||
ohlcvClose := make([]float64, len(ohlcvInputData))
|
||||
var allErrors []string
|
||||
for x := range ohlcvInputData {
|
||||
t, ok := ohlcvInputData[x].([]interface{})
|
||||
@@ -61,7 +61,7 @@ func ema(args ...objects.Object) (objects.Object, error) {
|
||||
if err != nil {
|
||||
allErrors = append(allErrors, err.Error())
|
||||
}
|
||||
ohlcvClose = append(ohlcvClose, value)
|
||||
ohlcvClose[x] = value
|
||||
}
|
||||
|
||||
inTimePeriod, ok := objects.ToInt(args[1])
|
||||
|
||||
@@ -47,7 +47,7 @@ func macd(args ...objects.Object) (objects.Object, error) {
|
||||
return nil, fmt.Errorf(modules.ErrParameterConvertFailed, OHLCV)
|
||||
}
|
||||
|
||||
var ohlcvClose []float64
|
||||
ohlcvClose := make([]float64, len(ohlcvInputData))
|
||||
var allErrors []string
|
||||
for x := range ohlcvInputData {
|
||||
t, ok := ohlcvInputData[x].([]interface{})
|
||||
@@ -61,7 +61,7 @@ func macd(args ...objects.Object) (objects.Object, error) {
|
||||
if err != nil {
|
||||
allErrors = append(allErrors, err.Error())
|
||||
}
|
||||
ohlcvClose = append(ohlcvClose, value)
|
||||
ohlcvClose[x] = value
|
||||
}
|
||||
|
||||
inFastPeriod, ok := objects.ToInt(args[1])
|
||||
|
||||
@@ -46,7 +46,7 @@ func rsi(args ...objects.Object) (objects.Object, error) {
|
||||
return nil, fmt.Errorf(modules.ErrParameterConvertFailed, OHLCV)
|
||||
}
|
||||
|
||||
var ohlcvClose []float64
|
||||
ohlcvClose := make([]float64, len(ohlcvInputData))
|
||||
var allErrors []string
|
||||
for x := range ohlcvInputData {
|
||||
t, ok := ohlcvInputData[x].([]interface{})
|
||||
@@ -61,7 +61,7 @@ func rsi(args ...objects.Object) (objects.Object, error) {
|
||||
if err != nil {
|
||||
allErrors = append(allErrors, err.Error())
|
||||
}
|
||||
ohlcvClose = append(ohlcvClose, value)
|
||||
ohlcvClose[x] = value
|
||||
}
|
||||
|
||||
inTimePeriod, ok := objects.ToInt(args[1])
|
||||
|
||||
@@ -46,7 +46,7 @@ func sma(args ...objects.Object) (objects.Object, error) {
|
||||
return nil, fmt.Errorf(modules.ErrParameterConvertFailed, OHLCV)
|
||||
}
|
||||
|
||||
var ohlcvClose []float64
|
||||
ohlcvClose := make([]float64, len(ohlcvInputData))
|
||||
var allErrors []string
|
||||
for x := range ohlcvInputData {
|
||||
t, ok := ohlcvInputData[x].([]interface{})
|
||||
@@ -60,7 +60,7 @@ func sma(args ...objects.Object) (objects.Object, error) {
|
||||
if err != nil {
|
||||
allErrors = append(allErrors, err.Error())
|
||||
}
|
||||
ohlcvClose = append(ohlcvClose, value)
|
||||
ohlcvClose[x] = value
|
||||
}
|
||||
|
||||
inTimePeriod, ok := objects.ToInt(args[1])
|
||||
|
||||
@@ -2,9 +2,9 @@ package ta
|
||||
|
||||
// AllModuleNames returns a list of all default module names.
|
||||
func AllModuleNames() []string {
|
||||
var names []string
|
||||
for name := range Modules {
|
||||
names = append(names, name)
|
||||
names := make([]string, 0, len(Modules))
|
||||
for x := range Modules {
|
||||
names = append(names, x)
|
||||
}
|
||||
return names
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user