forked from cerc-io/laconicd
Add lint config and fix lint errors (#7)
* Add config file for linter * Fix lint errors * Fix gofumpt errors * Fix pre-allocate slices lint error * Remove unused lint rule * Disable style check ID error * Add gomodguard section in yml file * Remove trailing white spaces * Remove unnecessary comments --------- Co-authored-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
This commit is contained in:
@@ -61,7 +61,6 @@ func RecordBondInvariant(k *Keeper) sdk.Invariant {
|
||||
|
||||
return false, nil
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
return sdk.FormatInvariant(
|
||||
types.ModuleName,
|
||||
|
||||
@@ -243,7 +243,11 @@ func (k Keeper) GetRecordsByBondId(ctx sdk.Context, bondId string) ([]registryty
|
||||
}
|
||||
|
||||
// RecordsFromAttributes gets a list of records whose attributes match all provided values
|
||||
func (k Keeper) RecordsFromAttributes(ctx sdk.Context, attributes []*registrytypes.QueryRecordsRequest_KeyValueInput, all bool) ([]registrytypes.Record, error) {
|
||||
func (k Keeper) RecordsFromAttributes(
|
||||
ctx sdk.Context,
|
||||
attributes []*registrytypes.QueryRecordsRequest_KeyValueInput,
|
||||
all bool,
|
||||
) ([]registrytypes.Record, error) {
|
||||
resultRecordIds := []string{}
|
||||
for i, attr := range attributes {
|
||||
suffix, err := QueryValueToJSON(attr.Value)
|
||||
|
||||
@@ -320,7 +320,10 @@ func (ms msgServer) DissociateBond(c context.Context, msg *registrytypes.MsgDiss
|
||||
return ®istrytypes.MsgDissociateBondResponse{}, nil
|
||||
}
|
||||
|
||||
func (ms msgServer) DissociateRecords(c context.Context, msg *registrytypes.MsgDissociateRecords) (*registrytypes.MsgDissociateRecordsResponse, error) {
|
||||
func (ms msgServer) DissociateRecords(
|
||||
c context.Context,
|
||||
msg *registrytypes.MsgDissociateRecords,
|
||||
) (*registrytypes.MsgDissociateRecordsResponse, error) {
|
||||
if err := msg.ValidateBasic(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@@ -75,7 +75,10 @@ func (qs queryServer) GetRecord(c context.Context, req *registrytypes.QueryGetRe
|
||||
return ®istrytypes.QueryGetRecordResponse{Record: record}, nil
|
||||
}
|
||||
|
||||
func (qs queryServer) GetRecordsByBondId(c context.Context, req *registrytypes.QueryGetRecordsByBondIdRequest) (*registrytypes.QueryGetRecordsByBondIdResponse, error) {
|
||||
func (qs queryServer) GetRecordsByBondId(
|
||||
c context.Context,
|
||||
req *registrytypes.QueryGetRecordsByBondIdRequest,
|
||||
) (*registrytypes.QueryGetRecordsByBondIdResponse, error) {
|
||||
ctx := sdk.UnwrapSDKContext(c)
|
||||
|
||||
records, err := qs.k.GetRecordsByBondId(ctx, req.GetId())
|
||||
|
||||
Reference in New Issue
Block a user