mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-31 23:16:54 +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:
@@ -7,7 +7,6 @@ import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"html/template"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"net/http"
|
||||
"os"
|
||||
@@ -329,7 +328,7 @@ func GetConfiguration() (Config, error) {
|
||||
configFilePath := filepath.Join(toolDir, "config.json")
|
||||
|
||||
if file.Exists(configFilePath) {
|
||||
config, err := ioutil.ReadFile(configFilePath)
|
||||
config, err := os.ReadFile(configFilePath)
|
||||
if err != nil {
|
||||
return c, err
|
||||
}
|
||||
@@ -360,7 +359,7 @@ func GetConfiguration() (Config, error) {
|
||||
return c, err
|
||||
}
|
||||
|
||||
if err := ioutil.WriteFile(configFilePath, data, 0770); err != nil {
|
||||
if err := os.WriteFile(configFilePath, data, file.DefaultPermissionOctal); err != nil {
|
||||
return c, err
|
||||
}
|
||||
|
||||
@@ -485,7 +484,7 @@ func GetPackageName(name string, capital bool) string {
|
||||
i = len(newStrings) - 1
|
||||
}
|
||||
if capital {
|
||||
return strings.Replace(strings.Title(newStrings[i]), "_", " ", -1)
|
||||
return strings.Replace(strings.Title(newStrings[i]), "_", " ", -1) // nolint // ignore staticcheck strings.Title warning
|
||||
}
|
||||
return newStrings[i]
|
||||
}
|
||||
@@ -540,7 +539,7 @@ func UpdateDocumentation(details DocumentationDetails) {
|
||||
continue
|
||||
}
|
||||
if name == engineFolder {
|
||||
d, err := ioutil.ReadDir(details.Directories[i])
|
||||
d, err := os.ReadDir(details.Directories[i])
|
||||
if err != nil {
|
||||
fmt.Println("Excluding file:", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user