Skip to content

Commit

Permalink
chore(devops): fixed deepsource warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
cnlangzi committed Mar 18, 2024
1 parent 8daaec1 commit d4b90f7
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 257 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ snapshots

# Output of the go coverage tool, specifically when used with LiteIDE
*.out

coverage.txt
__debug_bin*

# Dependency directories (remove the comment below to include it)
# vendor/
Expand Down
2 changes: 1 addition & 1 deletion cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func (c *Cluster) Join(ctx context.Context, p Peer) error {

_, err := a.WaitAny(ctx)

if err != nil && !exists {
if err == nil && !exists {
c.peers = append(c.peers, p)
}

Expand Down
5 changes: 0 additions & 5 deletions conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,3 @@ func (c *Conn) Write(p []byte) (n int, err error) {
go c.wait()
return c.Conn.Write(p)
}

func (c *Conn) Close() error {
go c.wait()
return c.Conn.Close()
}
247 changes: 0 additions & 247 deletions coverage.txt

This file was deleted.

3 changes: 1 addition & 2 deletions node_svc.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ func (n *Node) waitRequest(l net.Listener) {
}

func (n *Node) waitClose(ctx context.Context, l net.Listener) {
defer l.Close()

<-ctx.Done()
l.Close()
}
2 changes: 1 addition & 1 deletion snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ func (s *snapshot) Persist(sink raft.SnapshotSink) error {
return err
}

func (s *snapshot) Release() {}
func (_ *snapshot) Release() {}

0 comments on commit d4b90f7

Please sign in to comment.