mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-13 23:16:45 +00:00
Split common package more and QA
This commit is contained in:
@@ -2,6 +2,7 @@ package main
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
|
||||
"github.com/thrasher-/gocryptotrader/common"
|
||||
@@ -42,7 +43,7 @@ func main() {
|
||||
key = string(result)
|
||||
}
|
||||
|
||||
file, err := common.ReadFile(inFile)
|
||||
file, err := ioutil.ReadFile(inFile)
|
||||
if err != nil {
|
||||
log.Fatalf("Unable to read input file %s. Error: %s.", inFile, err)
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ import (
|
||||
"encoding/pem"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
|
||||
"github.com/thrasher-/gocryptotrader/common"
|
||||
@@ -59,7 +60,7 @@ func writeFile(file string, data []byte) error {
|
||||
|
||||
func main() {
|
||||
genKeys := false
|
||||
privKeyData, err := common.ReadFile("privatekey.pem")
|
||||
privKeyData, err := ioutil.ReadFile("privatekey.pem")
|
||||
if err != nil {
|
||||
genKeys = true
|
||||
}
|
||||
@@ -100,7 +101,7 @@ func main() {
|
||||
|
||||
} else {
|
||||
var pubKeyData []byte
|
||||
pubKeyData, err = common.ReadFile("publickey.pem")
|
||||
pubKeyData, err = ioutil.ReadFile("publickey.pem")
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user