Commit 14058225 authored by pengjun's avatar pengjun

#627 fix linter error

parent 4a057142
......@@ -57,7 +57,7 @@ func (tx *CollatetalizeRow) Get(key string) ([]byte, error) {
} else if key == "status" {
return []byte(fmt.Sprintf("%2d", tx.Status)), nil
} else if key == "addr" {
return []byte(fmt.Sprintf("%s", tx.AccountAddr)), nil
return []byte(tx.AccountAddr), nil
} else if key == "addr_status" {
return []byte(fmt.Sprintf("%s:%2d", tx.AccountAddr, tx.Status)), nil
}
......@@ -71,9 +71,7 @@ var optRecord = &table.Option{
Index: []string{"status", "addr", "id_status", "id_addr"},
}
/*
借贷记录表
*/
// NewRecordTable 借贷记录表
func NewRecordTable(kvdb db.KV) *table.Table {
rowmeta := NewRecordRow()
table, err := table.NewTable(rowmeta, kvdb, optRecord)
......@@ -114,7 +112,7 @@ func (tx *CollateralizeRecordRow) Get(key string) ([]byte, error) {
} else if key == "status" {
return []byte(fmt.Sprintf("%2d", tx.Status)), nil
} else if key == "addr" {
return []byte(fmt.Sprintf("%s", tx.AccountAddr)), nil
return []byte( tx.AccountAddr), nil
} else if key == "id_status" {
return []byte(fmt.Sprintf("%s:%2d", tx.CollateralizeId, tx.Status)), nil
} else if key == "id_addr" {
......
......@@ -67,9 +67,7 @@ var optRecord = &table.Option{
Index: []string{"status", "addr"},
}
/*
大户发行记录表
*/
// NewRecordTable 大户发行记录表
func NewRecordTable(kvdb db.KV) *table.Table {
rowmeta := NewRecordRow()
table, err := table.NewTable(rowmeta, kvdb, optRecord)
......@@ -110,7 +108,7 @@ func (tx *IssuanceRecordRow) Get(key string) ([]byte, error) {
} else if key == "status" {
return []byte(fmt.Sprintf("%2d", tx.Status)), nil
} else if key == "addr" {
return []byte(fmt.Sprintf("%s", tx.AccountAddr)), nil
return []byte(tx.AccountAddr), nil
}
return nil, types.ErrNotFound
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment