Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
ilija42 committed Jan 24, 2025
1 parent 1b18f25 commit 52d58a6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pkg/solana/codec/decoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ func (d *decoder) Decode(ctx context.Context, raw []byte, into any, itemType str
}()

if d.lenientCodecFromTypeCodec == nil {
return fmt.Errorf("decoder is not properly initalised, underlying lenientCodecFromTypeCodec is nil")
return fmt.Errorf("decoder is not properly initialised, underlying lenientCodecFromTypeCodec is nil")
}

return d.lenientCodecFromTypeCodec.Decode(ctx, raw, into, itemType)
}

func (d *decoder) GetMaxDecodingSize(_ context.Context, n int, itemType string) (int, error) {
if d.definitions == nil {
return 0, fmt.Errorf("decoder is not properly initalised, type definitions are nil")
return 0, fmt.Errorf("decoder is not properly initialised, type definitions are nil")
}

codecEntry, ok := d.definitions[itemType]
Expand Down
4 changes: 2 additions & 2 deletions pkg/solana/codec/encoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ func (e *encoder) Encode(ctx context.Context, item any, itemType string) (res []
}()

if e.lenientCodecFromTypeCodec == nil {
return nil, fmt.Errorf("encoder is not properly initalised, underlying lenientCodecFromTypeCodec is nil")
return nil, fmt.Errorf("encoder is not properly initialised, underlying lenientCodecFromTypeCodec is nil")
}

return e.lenientCodecFromTypeCodec.Encode(ctx, item, itemType)
}

func (e *encoder) GetMaxEncodingSize(_ context.Context, n int, itemType string) (int, error) {
if e.definitions == nil {
return 0, fmt.Errorf("encoder is not properly initalised, type definitions are nil")
return 0, fmt.Errorf("encoder is not properly initialised, type definitions are nil")
}

entry, ok := e.definitions[itemType]
Expand Down

0 comments on commit 52d58a6

Please sign in to comment.