Skip to content

Commit

Permalink
linter
Browse files Browse the repository at this point in the history
  • Loading branch information
Toktar committed Jul 13, 2022
1 parent 6ee5f66 commit 819813c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions services/ledger_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ func (ls LedgerService) QueryDIDDoc(did string) (cheqd.Did, cheqd.Metadata, bool

conn, err := ls.openGRPCConnection(serverAddr)
defer func(conn *grpc.ClientConn) {
if conn == nil { return }
if conn == nil {
return
}
err := conn.Close()
if err != nil {
log.Panic().Err(err).Msg("QueryDIDDoc: failed to close connection")
Expand Down Expand Up @@ -78,7 +80,9 @@ func (ls LedgerService) QueryResource(collectionDid string, resourceId string) (

conn, err := ls.openGRPCConnection(serverAddr)
defer func(conn *grpc.ClientConn) {
if conn == nil { return }
if conn == nil {
return
}
err := conn.Close()
if err != nil {
log.Panic().Err(err).Msg("QueryResource: failed to close connection")
Expand Down

0 comments on commit 819813c

Please sign in to comment.