mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-04 07:26:47 +00:00
linter: Enable gofumpt and run against codebase (#1848)
* linter: Enable gofumpt and run against codebase * Address shazbert's nits * gofumpt: Fix issues after rebase
This commit is contained in:
@@ -63,7 +63,7 @@ func Event(res *withdraw.Response) {
|
||||
}
|
||||
|
||||
func addPSQLEvent(ctx context.Context, tx *sql.Tx, res *withdraw.Response) (err error) {
|
||||
var tempEvent = modelPSQL.WithdrawalHistory{
|
||||
tempEvent := modelPSQL.WithdrawalHistory{
|
||||
ExchangeNameID: res.Exchange.Name,
|
||||
ExchangeID: res.Exchange.ID,
|
||||
Status: res.Exchange.Status,
|
||||
@@ -143,7 +143,7 @@ func addSQLiteEvent(ctx context.Context, tx *sql.Tx, res *withdraw.Response) (er
|
||||
return
|
||||
}
|
||||
|
||||
var tempEvent = modelSQLite.WithdrawalHistory{
|
||||
tempEvent := modelSQLite.WithdrawalHistory{
|
||||
ID: newUUID.String(),
|
||||
ExchangeNameID: res.Exchange.Name,
|
||||
ExchangeID: res.Exchange.ID,
|
||||
@@ -289,14 +289,14 @@ func getByColumns(q []qm.QueryMod) ([]*withdraw.Response, error) {
|
||||
}
|
||||
|
||||
var resp []*withdraw.Response
|
||||
var ctx = context.Background()
|
||||
ctx := context.Background()
|
||||
if repository.GetSQLDialect() == database.DBSQLite3 {
|
||||
v, err := modelSQLite.WithdrawalHistories(q...).All(ctx, database.DB.SQL)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
for x := range v {
|
||||
var tempResp = &withdraw.Response{}
|
||||
tempResp := &withdraw.Response{}
|
||||
var newUUID uuid.UUID
|
||||
newUUID, err = uuid.FromString(v[x].ID)
|
||||
if err != nil {
|
||||
@@ -369,7 +369,7 @@ func getByColumns(q []qm.QueryMod) ([]*withdraw.Response, error) {
|
||||
}
|
||||
|
||||
for x := range v {
|
||||
var tempResp = &withdraw.Response{}
|
||||
tempResp := &withdraw.Response{}
|
||||
newUUID, _ := uuid.FromString(v[x].ID)
|
||||
tempResp.ID = newUUID
|
||||
tempResp.Exchange.ID = v[x].ExchangeID
|
||||
|
||||
Reference in New Issue
Block a user