Skip to content

Commit

Permalink
feat: CloseFunc type definition and NOP close
Browse files Browse the repository at this point in the history
  • Loading branch information
shoriwe committed May 31, 2023
1 parent 73e144a commit 5945d2a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions utils/network/dial.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ package network

import "net"

type CloseFunc func() error

func NopClose() error {
return nil
}

type DialFunc func(n, a string) (net.Conn, error)

func Dial(addr string) net.Conn {
Expand Down

0 comments on commit 5945d2a

Please sign in to comment.